C API Menu Add-In

I ran into an issue while implementing a menu addin. Scenario:NAM_IN_DESKTOP - all additional menu items disabled

click on the actions menu

don’t select anything

move your mouse over to the create menu

move back to the actions menu

all menu items under actions menu are enabled

has anyone run into this?

Subject: *Weird. It does it for me as well. Maybe the bookmarks have focus or something.

Subject: RE: *Weird. It does it for me as well. Maybe the bookmarks have focus or something.

just for reference this has to do with the fact that the window message is not WM_INITMENU in that case but WM_INITMENUPOPUP and menu add-in api doesn’t do that one.

Subject: RE: *Weird. It does it for me as well. Maybe the bookmarks have focus or something.

Workaround:

Set WH_CALLWNDPROCRET hook on addin startup and when WM_INITMENUPOPUP is passed modify the menu to your liking.