#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <winapiex.au3>
#include <Process.au3>
Opt('MustDeclareVars', 1)
Global $gui
Example()
Func Example()
Local $checkCN, $msg
$gui=GUICreate("My GUI Checkbox",-1,-1,-1,-1,$WS_POPUP + $WS_SIZEBOX)
$checkCN = GUICtrlCreateGroup ("CHECKBOX 1", 10, 10, 200, 60, 0x0009)
GUISetState() ; will display an dialog box with 1 checkbox
GUIRegisterMsg(0x0084, "WM_NCHITTEST")
While 1
$msg = GUIGetMsg()
Switch $msg
case -3
Exit
Case $checkCN
msgbox(0,0,"ok")
EndSwitch
WEnd
EndFunc ;==>Example
Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
If ($hWnd = $gui) and ($iMsg = $WM_NCHITTEST) then Return $HTCAPTION;
EndFunc
|