Jump to content

Crash in WM_COMMAND DllStructGetData()


Recommended Posts

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

 

Link to post
Share on other sites
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.

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...