See "Simplifying context menu extensions with IExecuteCommand". As I understand, it's not a replacement for IContextMenu
et al. If you need fancy UI features available with IContextMenu
, keep using it. If you don't, IExecuteCommand
is easier to implement.
Versatility of IExecuteCommand vs. IContextMenu
-
24-06-2022 - |
Domanda
Following the "classic" IContextMenu
way of creating context menu shell extensions, it's possible to associate an image to each of the new custom menu items.
In fact, in IContextMenu::QueryContextMenu()
implementation, it's possible to call SetMenuItemBitmaps()
API to set the bitmap for the custom menu item.
Moreover, using IContextMenu3::HandleMenuMsg2()
, it's possible to respond to WM_MEASUREITEM
and WM_DRAWITEM
shell messages, to implement some custom owner drawing.
Does the new Windows 7+ IExecuteCommand
interface allow this versatility?
Using this interface, is it possible to set custom images for menu items, and do some owner drawing?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow