megahyperion Posted April 17, 2006 Share Posted April 17, 2006 I tired using the examples herehttp://www.autoitscript.com/forum/index.php?showtopic=12827to make a custom shaped gui but i keep getting the following error$lppt=DllStructCreat($buffer)Unknown function nameI have the latest Autoit and even the latest Autoit Beta but still no go.Any help is aprecited.Thanks Link to comment Share on other sites More sharing options...
megahyperion Posted April 17, 2006 Author Share Posted April 17, 2006 got it had to take out all the dllstruct stuff Link to comment Share on other sites More sharing options...
Valuater Posted April 17, 2006 Share Posted April 17, 2006 try this expandcollapse popup#include <GUIConstants.au3> $GUI = GUICreate("test",300,300,-1,-1,$WS_POPUP) GUISetBkColor(0xFFFFFF) ; CreatePolyRgn takes an array of points... ; the following goes from ; 0,0 to ; 600,500 to ; 500,800 to ; 100,500 to ; 0,0 $a = CreatePolyRgn("0,0,600,500,500,800,100,500,0,0") SetWindowRgn($GUI,$a) $Eggzit = GUICtrlCreateButton("Bye",80,170,60,25) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $Eggzit Or $msg = $GUI_EVENT_CLOSE Then Exit WEnd Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc Func CreatePolyRgn($pt) Local $ALTERNATE = 1 Local $buffer = "" $pt = StringSplit($pt,",") For $i = 1 to $pt[0] $buffer = $buffer & "int;" Next $buffer = StringTrimRight($buffer,1) $lppt = DllStructCreate($buffer) For $i = 1 to $pt[0] DllStructSetData($lppt,$i,$pt[$i]) Next $ret = DllCall("gdi32.dll","long","CreatePolygonRgn", _ "ptr",DllStructGetPtr($lppt),"int",Int($pt[0] / 2), _ "int",$ALTERNATE) $lppt = 0 Return $ret[0] EndFunc 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now