l4tran Posted January 12, 2023 Posted January 12, 2023 Hi, I'm trying to implement a double click event in a listview. But somehow it's crashing the program. I'm suspecting that it has something to do with DllStructGetData() function. Im running on version 3.3.16.1 Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($inputSerial) If $iCode = $EN_SETFOCUS Then $inputFocus = $inputSerial Case GUICtrlGetHandle($inputWorkSlip) If $iCode = $EN_SETFOCUS Then $inputFocus = $inputWorkSlip Case GUICtrlGetHandle($inputMain) If $iCode = $EN_SETFOCUS Then $inputFocus = $inputMain EndSwitch $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $iCode Case $NM_DBLCLK If $iIDFrom = $idListview Then _EditListItem(_GUICtrlListView_GetItemText($idListview, _GUICtrlListView_GetHotItem($idListview))) EndIf EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
Developers Jos Posted January 12, 2023 Developers Posted January 12, 2023 Post a runnable replicatie script and the details of the crash as it will be hard to assist without them. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
l4tran Posted January 12, 2023 Author Posted January 12, 2023 21 minutes ago, Jos said: Post a runnable replicatie script and the details of the crash as it will be hard to assist without them. I don't understand what a "runnable replicatie script" is. Please explain. When I run the script, the program just hangs and then it self terminate.
Developers Jos Posted January 12, 2023 Developers Posted January 12, 2023 Not when you run the posted script as that does nothing. Post a script that demonstrates the issue. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
mikell Posted January 12, 2023 Posted January 12, 2023 3 hours ago, l4tran said: I'm trying to implement a double click event in a listview For this you should use WM_NOTIFY - and btw have a look to the example for _GUICtrlListView_Create in the help file
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