Shortcut Menu Reference
This topic lists the main programming elements used with shortcut (context) menus, and shortcut menu handlers. Shortcut menu handlers, which also known as context menu handlers or verb handlers, are a type of file type handler.
It is strongly encouraged that you implement a shortcut menu using one of the static verb methods. Please review the following instructions:
- To use a static verb method to implement a shortcut menu, see the "Customizing a Shortcut Menu using Static Verbs" section of Creating Shortcut Menu Handlers.
- To get dynamic behavior for static verbs in Windows 7 and later, see "Getting Dynamic Behavior for Static Verbs" in Creating Shortcut Menu Handlers.
- For details on static verb implementation, and which dynamic verbs to avoid, see Choosing a Static or Dynamic Verb for your Shortcut Menu.
- If you must extend the shortcut menu for a file type by registering a dynamic verb for the file type, then follow the instructions provided in Customizing a Shortcut Menu Using Dynamic Verbs.
Topic | Contents |
---|---|
IContextMenu | Exposes methods that either create or merge a shortcut menu associated with a Shell object. |
IContextMenu2 | Exposes methods that either create or merge a shortcut (context) menu associated with a Shell object. Extends IContextMenu by adding a method that allows client objects to handle messages associated with owner-drawn menu items. |
IContextMenu3 | Exposes methods that either create or merge a shortcut menu associated with a Shell object. Allows client objects to handle messages associated with owner-drawn menu items and extends IContextMenu2 by accepting a return value from that message handling. |
IContextMenuCB | Exposes a method that enables the callback of a context menu. For example, to add a shield icon to a menuItem that requires elevation. |
IContextMenuSite | Implemented by the default folder view created using SHCreateShellFolderView. An implementation of IContextMenuSite supports IContextMenu::QueryContextMenu, IContextMenu::InvokeCommand, and TrackPopupMenu and any message forwarding necessary for that function. IContextMenuSite typically updates the status bar as well. |
Topic | Contents |
---|---|
CDefFolderMenu_Create2 | Creates a context menu for a selected group of file folder objects. |
LPFNDFMCALLBACK | Defines the prototype for the callback function that receives messages from the Shell's default context menu implementation. |
SHCreateDefaultContextMenu | Creates an object that represents the Shell's default context menu implementation. |
Topic | Contents |
---|---|
CMINVOKECOMMANDINFO | Contains information needed by IContextMenu::InvokeCommand to invoke a shortcut menu command. |
CMINVOKECOMMANDINFOEX | Contains extended information about a shortcut menu command. This structure is an extended version of CMINVOKECOMMANDINFO that allows the use of Unicode values. |
DEFCONTEXTMENU | Contains context menu information used by SHCreateDefaultContextMenu. |