#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$gui1=GUICreate('', 400, 300)
$Label1 = GUICtrlCreateLabel('Label1', 10, 10, 380, 280, $WS_BORDER)
GUICtrlSetBkColor(-1, 0xC0DCC0)
$Label2 = GUICtrlCreateLabel('Label2', 150, 50, 100, 30, 0x01 + 0x0200 + $WS_BORDER)
GUICtrlSetCursor(-1, 0)
GUICtrlSetState(-1, $GUI_SHOW + $GUI_ONTOP)
GUICtrlCreateLabel('Label2', 150, 50, 100, 30, 0x01 + 0x0200 + $WS_BORDER)
$Button1 = GUICtrlCreateButton('Button1', 150, 120, 100, 30)
GUICtrlSetState(-1, $GUI_SHOW + $GUI_ONTOP)
$Checkbox1 = GUICtrlCreateCheckbox('Checkbox1', 150, 190, 100, 30)
;~ GUICtrlSetState (-1, $GUI_SHOW + $GUI_ONTOP)
GUISetState()
$gui2 = GUICreate("其他控件", 400, 300, -1, -1, 0x80000000, 0x00080040, $gui1)
$Label3 = GUICtrlCreateLabel('Label3', 40, 60, 100, 30)
GUICtrlSetBkColor(-1, 0xC0DCC0)
$Button2 = GUICtrlCreateButton('Button2', -1, 120, 100, 30)
$Checkbox2 = GUICtrlCreateCheckbox('Checkbox2', -1, 190, 100, 30)
GUICtrlSetBkColor(-1, 0xC0DCC0)
GUISetBkColor(0xFFFFFE)
$tms = 0xFFFFFE
$tms = Int(BinaryMid($tms, 3, 1) & BinaryMid($tms, 2, 1) & BinaryMid($tms, 1, 1))
DllCall("user32.dll", "bool", "SetLayeredWindowAttributes", "hwnd", $gui2, "dword", $tms, "byte", 0, "dword", 1)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Label1
MsgBox(0, 'Label1', 'CtrlID = ' & $nMsg)
Case $Label2
MsgBox(0, 'Label2', 'CtrlID = ' & $nMsg)
Case $Button1
MsgBox(0, 'Button1', 'CtrlID = ' & $nMsg)
Case $Checkbox1
MsgBox(0, 'Checkbox1', 'CtrlID = ' & $nMsg)
Case $Label3
MsgBox(0, 'Label3', 'CtrlID = ' & $nMsg)
Case $Button2
MsgBox(0, 'Button2', 'CtrlID = ' & $nMsg)
Case $Checkbox2
MsgBox(0, 'Checkbox2', 'CtrlID = ' & $nMsg)
EndSwitch
WEnd