Contents Index Topic Contents | ||
Previous Topic: IContextMenu::QueryContextMenu Next Topic: IContextMenu2::GetCommandString |
IContextMenu2
The IContextMenu2 interface is used to either create or merge a context menu associated with a certain object when the menu involves owner-drawn menu items.
When to Implement
Implement IContextMenu2 if your context menu extension needs to process one or more of the following messages:
WM_INITMENUPOPUP WM_DRAWITEM WM_MEASUREITEM These messages are forwarded to IContextMenu2through the HandleMenuMsg methodonly if a QueryInterface call for an IContextMenu2 interface pointer is successful, indicating that the object supports this interface.
When to Use
You do not call this interface directly. IContextMenu2 is used by the operating system only when it has confirmed that your application is aware of this interface.
IContextMenu2 is derived from IUnknown. The following methods are specific to IContextMenu2.
IContextMenu2 Methods Description GetCommandString Retrieves the language-independent name of a menu command or the Help text for a menu command. HandleMenuMsg Handles messages related to drawing owner-drawn menu items. InvokeCommand Carries out a menu command. For an example, see the IExtractIcon interface. QueryContextMenu Adds commands to a context menu.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.