seres Posted April 21, 2016 Posted April 21, 2016 hello, im trying to get data inside a gui control list when double clicked but i cant get it to work here is what i got so far expandcollapse popup#include <GuiConstants.au3> Global $DoubleClicked = False GUICreate("Double Click Demo", 400, 300) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") $List = GUICtrlCreateList("List Column", 10, 20, 350, 250) GUICtrlSetData(-1, "double click me for a msgbox") GUISetState() While GUIGetMsg() <> -3 Sleep(10) If $DoubleClicked Then DoubleClickFunc() $DoubleClicked = False EndIf WEnd Func DoubleClickFunc() MsgBox(64, "OK", "Data selected is: " & GUICtrlRead($List)) EndFunc Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam) Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return 0 $code = DllStructGetData($tagNMHDR, 3) If $wParam = $List And $code = -3 Then $DoubleClicked = True Return $GUI_RUNDEFMSG EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now