Jump to content

Listview Doubleclicks when GUIOnEventMode=1


Recommended Posts

I can't seem to figure out a way to capture doubleclicks on listview items when GUIOnEventMode=1.

I read everything I can find and see lots of stuff about GUIOnEventMode=0, but can't find any examples that apply in this case.

Can someone help please?

Link to comment
Share on other sites

I can't seem to figure out a way to capture doubleclicks on listview items when GUIOnEventMode=1.

I read everything I can find and see lots of stuff about GUIOnEventMode=0, but can't find any examples that apply in this case.

Can someone help please?

#cs
    Global Const $NM_FIRST = 0
    Global Const $NM_CLICK = ($NM_FIRST - 2)
    Global Const $NM_DBLCLK = ($NM_FIRST - 3)

#ce
.
.
$Listview1 = GuiCtrlCreateListView(...................
.
.
.
GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events")
.
..
.

Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam)
    #forceref $hWndGUI, $MsgID, $wParam
    Local $tagNMHDR, $event
    $tagNMHDR = DllStructCreate("int;int;int", $lParam);NMHDR (hwndFrom, idFrom, code)
    If @error Then Return
    $event = DllStructGetData($tagNMHDR, 3)
    Select
        Case $wParam = $Listview1
            Select
                Case $event = $NM_CLICK
                    List_view_Click();your function
                Case $event = $NM_DBLCLK
                    ListView_DoubleClick();your function
            EndSelect
    EndSelect
    $tagNMHDR = 0
    $event = 0
    $lParam = 0
EndFunc  ;

EDIT: Onevent mode does not effect this.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...