smashly Posted August 12, 2009 Posted August 12, 2009 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?
billthecreator Posted August 12, 2009 Posted August 12, 2009 (edited) 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 August 12, 2009 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
smashly Posted August 12, 2009 Author Posted August 12, 2009 try using $LVN_ITEMACTIVATEand 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 yesturdayHi 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 0I 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
billthecreator Posted August 12, 2009 Posted August 12, 2009 in my Case $LVN_ITEMACTIVATE, i dont use the struct... and it works. see if you put a msgbox in there if it works... [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap
smashly Posted August 12, 2009 Author Posted August 12, 2009 Thanks again bill, I worked out what is going wrong.. The "int code" in $tagNMHDR struct needs to be "int64 code". Cheers
Psibernetic Posted February 8, 2010 Posted February 8, 2010 (edited) 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 February 9, 2010 by Psibernetic [sup]Psibernetic[/sup]My Creations:X-HideSecuracy
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now