Jump to content
Sign in to follow this  
smashly

ListView + GuiRegisterMsg + WM_NOTIFY+ Win7 x64

Recommended Posts

smashly

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?

Share this post


Link to post
Share on other sites
billthecreator

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

Share this post


Link to post
Share on other sites
smashly

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

Share this post


Link to post
Share on other sites
smashly

Thanks again bill,

I worked out what is going wrong..

The "int code" in $tagNMHDR struct needs to be "int64 code".

Cheers

Share this post


Link to post
Share on other sites
Psibernetic

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.