picea892 Posted March 22, 2010 Share Posted March 22, 2010 Const $RGN_AND = 1 Const $RGN_OR = 2 Const $RGN_XOR = 3 Const $RGN_DIFF = 4 Const $RGN_COPY = 5 $nada=GUICreate("",500,500,0,0) _GuiHole($nada,50,50,50,50) GUISetState() while 1 sleep(1000) WEnd Func _GuiHole($h_win, $i_x, $i_y, $i_sizew, $i_sizeh) Dim $pos, $outer_rgn, $inner_rgn, $wh, $combined_rgn $pos = WinGetPos($h_win) $outer_rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", $pos[2], "long", $pos[3]) $inner_rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $i_x, "long", $i_y, "long", $i_x + $i_sizew, "long", $i_y + $i_sizeh) $combined_rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0) DllCall("gdi32.dll", "long", "CombineRgn", "long", $combined_rgn[0], "long", $outer_rgn[0], "long", $inner_rgn[0], "int", $RGN_DIFF) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $combined_rgn[0], "int", 1) EndFunc 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