Sign in to follow this  
Followers 0
kwlayman

Listview Doubleclicks when GUIOnEventMode=1

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

Works great, thank you very much!

Share this post


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
Sign in to follow this  
Followers 0