Hi @Anonymous ,
To modify the context menu retrieved from IContextMenu
, you'll need to:
- Remove an existing menu item: This can be done by modifying the menu handle (
hMenu
) returned byQueryContextMenu
. - Remove/Add a custom menu item: This can be achieved using the RemoveMenu and AppendMenu API.
- Assign an icon: You can use SetMenuItemBitmaps or ModifyMenu to associate an icon with the custom menu item.
Best Regards.
Jiachen Li
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.