Page 1 of 1
[Solved] PopupMenu and PMIA_CommKey ?
Posted: Mon Nov 02, 2015 8:15 am
by zzd10h
Hi,
I'm trying to add a shortcut key to a
PopupMenu with
PMIA_CommKey.
The
shortcut is well displayed but have no effect.
Is something special to add to handle a shortcut ?
Thank you by advance for your help.

Re: PopupMenu and PMIA_CommKey ?
Posted: Mon Nov 02, 2015 1:49 pm
by broadblues
Are you using the hook or PM_HANDLEINPUT ?
I think from scanning the autodocs you need the latter for keyboard short cuts. Never having used it I can't help more.
Re: PopupMenu and PMIA_CommKey ?
Posted: Mon Nov 02, 2015 9:23 pm
by zzd10h
Thank you for your help.
I use the the handler like in the PopupMenu SDK example.
Like I don't know how to use PM_HANDLEINPUT, I simply use WMHI_RAWKEY in my window event loop to trap IEQUALIFIER_RCOMMAND and the key code and it works
I wondered if it was possible to do it easy like in NewMenu and MenuClass shortcuts.
Re: [Solved] PopupMenu and PMIA_CommKey ?
Posted: Sat Nov 07, 2015 10:40 pm
by chris
AFAIK the shortcuts displayed on context menus are for information only. They are never trapped, you need to do it yourself (or add a corresponding item to the main menu strip). Intuition context menus work the same way (except the display of the shortcut doesn't work).
Re: [Solved] PopupMenu and PMIA_CommKey ?
Posted: Sat Nov 07, 2015 11:08 pm
by zzd10h
@Chris
Thank you, as I wrote in the previous post, I did it myself.