IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: ExMember001 on November 15, 2006, 01:59:03 AM

Title: Detecting Enter key in listview
Post by: ExMember001 on November 15, 2006, 01:59:03 AM
Hi,
I'm Trying to detect enter key in OnNotify()
a key is detect but the enter key is not return...
What am i doing wrong?


if(code = LVNKEYDOWN) /* Double click droit */
    {
    if (*(NMLISTVIEW)pnmhdr.iItem) <> -1
    {

NMTCKEYDOWN VKey;
messagebox(this,numtostr(Vkey.wVKey),"test");
if Vkey.wVKey = 0x0D //Enter
{
//do something
}
}
}
Title: Re: Detecting Enter key in listview
Post by: sapero on November 15, 2006, 02:08:32 AM
KrYpT, LVN_KEYDOWN Notification has other syntax, the lParam points to NMLVKEYDOWN structure
struct LVKEYDOWN {
    NMHDR hdr;
    WORD wVKey; // Virtual key code
    UINT flags; // zero
}

You can download free winsows xp/server/vista platform SDK, or the whole MSDN and lookup here for all questions :)
Title: Re: Detecting Enter key in listview
Post by: ExMember001 on November 15, 2006, 02:14:49 AM
i've tryed NMTCKEYDOWN (already defined Aurora struct) which is the same as NMLVKEYDOWN (also tryed)
it return the samething...
Title: Re: Detecting Enter key in listview
Post by: ExMember001 on November 15, 2006, 02:21:23 AM
ok found it,
if (*(NMTCKEYDOWN)pnmhdr.wVKey) = 0x0D //Enter
is doing the trick ;)

Thank sapero :)