IContextMenuIContextMenu*
*Contents  *Index  *Topic Contents
*Previous Topic: ICommDlgBrowser::OnStateChange
*Next Topic: IContextMenu::GetCommandString

IContextMenu


The IContextMenu interface is used to either create or merge a context menu associated with a certain object.

Default context menus are available for most objects that are visible within Windows Explorer's namespace, such as files, folders, and printer objects. System-provided context menus are adaptable to file objects of any type, provided you have made the appropriate registry entries.

When to Implement

Implement IContextMenu in the following situations:

Shell extensions based on this interface must be initialized by using the IShellExtInit interface.

Also note that shell extensions do not work unless all appropriate registry entries are made.

When to Use

You do not call this interface directly. It is called by the shell when a user chooses a context menu item that has been added by a handler registered under the appropriate registry keys or when an application includes it as the riid parameter in a call to IShellFolder::GetUIObjectOf.
IContextMenu Methods Description
GetCommandString Retrieves the language-independent name of a menu command or the Help text for a menu command.
InvokeCommand Carries out a menu command. For an example, see the IExtractIcon interface.
QueryContextMenu Adds commands to a context menu.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.