Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
The IExtendContextMenu::Command method is called if one of the items you added to the context menu with IExtendContextMenu::AddMenuItems is subsequently selected. MMC calls Command with the command ID you specified and another pointer to the same IDataObject interface.
Syntax
HRESULT Command(
[in] long lCommandID,
[in] LPDATAOBJECT piDataObject
);
Parameters
[in] lCommandID
A value that specifies the command identifier of the menu item.
[in] piDataObject
A pointer to the IDataObject interface on the object whose context menu was displayed.
Return value
This method can return one of these values.
Remarks
MMC reserves negative-valued command IDs for predefined menu command IDs that it sends to a snap-in's IExtendContextMenu::Command method. The –1 command ID is the MMCC_STANDARD_VIEW_SELECT enumerator value defined in mmc.h. This is sent to IExtendContextMenu::Command when the user clicks a standard view command on the View menu (Large, Small, List, or Detail). This notifies the snap-in that the user is switching away from a custom view (OCX, HTML). After getting an MMCC_STANDARD_VIEW_SELECT command, the snap-in should request a standard view the next time its IComponent::GetResultViewType method is called and not request a custom view until one of its custom view menu items is selected. If the snap-in only uses standard views or only uses custom views, it can ignore the MMCC_STANDARD_VIEW_SELECT command.
MMC sends the snap-in the MMCC_STANDARD_VIEW_SELECT command when the user clicks the Back button on the toolbar. MMC uses this command to instruct the snap-in to display the result pane's previous view.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Target Platform | Windows |
| Header | mmc.h |