au3-Func判断双击
#include <GUIConstants.au3>Global Const $WM_COMMAND = 0x0111, $LBN_SELCHANGE = 1, $LBN_DBLCLK = 2
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
$GUIList = GUICreate("", 230, 250, -1, 40)
$List = GUICtrlCreateList("", 3, 3, 220, 446)
For $i = 1 To 4
GUICtrlSetData($List, $i)
Next
GUISetState()
While 1
$Msg = GUIGetMsg()
Select
Case $Msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
Func MY_WM_COMMAND($hWndGUI, $MsgID, $wParam, $lParam)
Local $nNotifyCode = BitShift($wParam, 16)
Local $nID = BitAND($wParam, 0x0000FFFF)
Local $hCtrl = $lParam
If $nID = $List Then
Switch $nNotifyCode
Case $LBN_DBLCLK
MsgBox(0, "", "")
Return 0
EndSwitch
EndIf
EndFunc
页:
[1]