I have created a shell extension for windows with COM
, however I seem to fail to properly match the ids of items I add in the overload of IContextMenu::QueryContextMenu
with what I receive in the overload of IContextMenu::InvokeCommand
. In my code I use InsertMenu
and InsertMenuItem
(as far as I understood they do the same, but the latter has some more features?). However I'm not sure which arguments passed to InsertMenu
/InsertMenuItem
correspond to what I must be looking for in LPCMINVOKECOMMANDINFO::lpVerb
. I need some way to easily know that when I add items x
, y
, z
to a context menu, I can then know exactly which one of x
, y
or z
has been clicked.
EDIT: It seems that the verb equals the number from top to bottom of the item in the current menu/submenu. However I have two sub-menus each with x
amount of items, so they have the same IDs of 1,2,3. How do I set custom IDs or something?