问题
Apologies if this is a stupid question, but I was wondering if it's possible to use a menu template resource when implementing a shortcut menu handler (IContextMenu
).
And if not, is there still an accepted strategy for adding a large number of menu items? Perhaps with LoadMenuIndirect
?
Thank you for any guidance.
回答1:
Sure, use the LoadMenu API to get an HMENU and then InsertMenuItem to create a new item on the top-level popup with your resource-specified menu.
来源:https://stackoverflow.com/questions/62354817/is-it-possible-to-use-a-menu-template-resource-within-a-shortcut-menu-handler