如何在List控件上实现双击动作
新手上路,请多指教!在自己的UI界面上有一个List控件,当鼠标双击List中的某个条目时执行自己想要做的事,请问如何实现?谢谢! 看看帮助 http://www.autoitx.com/forum.php?mod=viewthread&tid=1972&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
页:
[1]