Is it possible to use a menu template resource within a shortcut menu handler?

流过昼夜 提交于 2020-07-10 06:54:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!