IContextMenuCallback2 interface

The IContextMenuCallback2 interface is used to add menu items to a context menu. This interface supersedes IContextMenuCallback.

When to implement

Do not implement this interface. It is implemented by the MMC Node Manager.

When to use

There are two situations in which you use IContextMenuCallback2. The first is during a call to IExtendContextMenu::AddMenuItems (implemented by the snap-in). Use IContextMenuCallback2::AddItem to add items to the context menu for an item you own in the result list view, in the scope pane, or for an item you are extending as a third-party context menu extension. If one of the items you add is selected, you are notified by IExtendContextMenu::Command.

The second situation in which you use this interface is when you create a context menu using IContextMenuProvider. In which case, you call IContextMenuCallback2::AddItem after calling IContextMenuProvider::EmptyMenuList, but before calling IContextMenuProvider::ShowContextMenu.

Members

The IContextMenuCallback2 interface inherits from the IUnknown interface. IContextMenuCallback2 also has these types of members:

Methods

The IContextMenuCallback2 interface has these methods.

MethodDescription
AddItem

Adds one item to the context menu.

 

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

Library

Mmc.lib

DLL

Mmcndmgr.dll

 

 

Show: