/sigh/ I have so far to learn... lol
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
$Main_Gui = GUICreate("", 400, 400, 20, 20, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
$But1 = GUICtrlCreateButton(" Exit ", 100, 100, 80, 21)
; Must be within GUI window
$Vol_Up_ID = GUICtrlCreateButton("Vol Up", 300, 200, 80, 30)
$Vol_Dn_ID = GUICtrlCreateButton("Vol Down", 300, 230, 80, 30)
GUISetControlsVisible($Main_Gui)
GUISetState()
While 1
If GUIGetMsg() = $But1 Then Exit
WEnd
Func GUISetControlsVisible($hWnd)
Local $aM_Mask, $aCtrlPos, $aMask
$aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0)
$aLastID = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", GUICtrlGetHandle(-1))
For $i = 3 To $aLastID[0]
$aCtrlPos = ControlGetPos($hWnd, '', $i)
If Not IsArray($aCtrlPos) Then ContinueLoop
$aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", _
"long", $aCtrlPos[0], _
"long", $aCtrlPos[1], _
"long", $aCtrlPos[0] + $aCtrlPos[2], _
"long", $aCtrlPos[1] + $aCtrlPos[3])
DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2)
Next
DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aM_Mask[0], "int", 1)
EndFunc
..am I understanding it correctly that it's basically creating a mask over the form?
I don't really get DLLCalls I guess. My math is... horrible at best so I'm not really getting the usage in it, but I will continue to research that further down the line. But if I understand this correctly... GUISetControlsVisible function will mask the form no matter the size/layout so... .. in theory if I had to use this same function on say 3 or 4 gui's in 1 program the $hWnd would go back to when i called the function and hide the appropriate form that i note in the function call...right?
GUISetControlsVisible($Main_Gui)
GUISetControlsVisible($Main_Gui1)
GUISetControlsVisible($Main_Gui2)
etc...