http://www.autoitx.com/forum.php ... &extra=page%3D1
#include <GUIConstants.au3>
Const $DebugIt = 1
Global Const $WM_COMMAND = 0x0111
Global Const $STN_DBLCLK = 1
GUICreate("双击控件例子")
$test=GUICtrlCreateLabel("双击我试下",100,50,100,30)
GUISetState()
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
Do
$msg = GUIGetMsg()
Until $msg = -3
Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam)
Local $nNotifyCode = BitShift($wParam,16)
Local $nID = BitAND($wParam, 0xFFFF)
Local $hCtrl = $lParam
Switch $nID
Case $test
Switch $nNotifyCode
Case $STN_DBLCLK
MsgBox(16,"警告","你丫的,还真的双击啊")
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>MY_WM_COMMAND
|