Jump to content

ListView + GuiRegisterMsg + WM_NOTIFY+ Win7 x64


Recommended Posts

Hi,

As the Topic Title/Description says

I'm having problems getting the $NM_CLICK on a listview to register Win7 x64 Autoit v3.3.0.0 & beta v3.3.1.1

$iCode = DllStructGetData($tNMHDR, "Code") is always returning 0

I thought I'd missed something in my code I was writing.

But I'm getting the same results running AutoIt's UDF ListView examples.

Is it just me?

Link to comment
Share on other sites

try using $LVN_ITEMACTIVATE

and add this to the listview creation

_GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_ONECLICKACTIVATE)

I actually just found that after looking for 10 minutes in the help file when i was working on my script yesturday

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

try using $LVN_ITEMACTIVATE

and add this to the listview creation

_GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_ONECLICKACTIVATE)

I actually just found that after looking for 10 minutes in the help file when i was working on my script yesturday

Hi and thanks for the advice, but it doesn't seem to fix it.

The "Code" value in the $tagNMHDR struct is not being set with any data on any event on the ListView.

It's not just $NM_CLICK, it's any event and the $iCode returns 0

I thought it was just me, but the same code still works fine on my ol' faithful XP x86/x64..

There's definitely something broken, probably my Win7 >_<

Doh I thought my transition to Win7 was going to smooth.. lol

Link to comment
Share on other sites

  • 5 months later...

I am having same issue. I cannot however find an example of using $LVN_ITEMACTIVATE to bypass this issue, can I get an example or link to one?

I solved this by editing $tagNMHDR in StructureConstants.au3 include to:

Switch @OSArch
    Case "X86"
        Global $tagNMHDR = "hwnd hWndFrom;int IDFrom;int Code"
    Case "X64"
        Global $tagNMHDR = "hwnd hWndFrom;int64 IDFrom;int Code"
EndSwitch

I dislike that I had to make it a variable and not a constant, but this code generates errors if it is a Const, due to the conditional statement.

Edited by Psibernetic

[sup]Psibernetic[/sup]My Creations:X-HideSecuracy

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...