IConsoleVerb::SetDefaultVerb

[This is preliminary documentation and subject to change.]

Sets the default action on an object.

HRESULT SetDefaultVert(
  MMC_CONSOLE_VERB eCmID,     // The default verb
);
 

Parameters

eCmID
The default verb.

Return Values

S_OK.
The verb was successfully set.

Remarks

The MMC_CONSOLE_VERB enumeration defines the set of default verbs.

See Also

IConsoleVerb::GetDefaultVerb, MMC_CONSOLE_VERB

^IConsoleVerb::SetVerbState

[This is preliminary documentation and subject to change.]

Enables a snap-in to set a given verb's button state.

HRESULT SetVerbState(
  MMC_CONSOLE_VERB m_eCmdID,  // Command identifier of the verb.
  MMC_BUTTON_STATE nState,  // State of the menu item
  BOOL bState               // TRUE or FALSE.
);
 

Parameters

m_eCmdID
[in] Specifies the command identifier of the verb. Values are taken from the MMC_CONSOLE_VERB enumeration and can be one of the following:
Value Meaning
MMC_VERB_CUT Enables an item that can be selected to be copied to the clipboard and removed. Implemented by the user.
MMC_VERB_COPY Enables the selected item that can be selected to be copied to the clipboard. Implemented by the user.
MMC_VERB_PASTE Enables the selected item that have been cut or copied to be pasted into the result pane. Implemented by the user.
MMC_VERB_DELETE Enables the selected item to be deleted. Implemented by the console. A notification will be sent to the snap-in that owns that item.
MMC_VERB_PROPERTIES The console asks the snap-in and all snap-in extensions to provide property pages for the currently selected item. Implemented by the console.
MMC_VERB_RENAME Enables the selected item to be renamed. Implemented by the console.
MMC_VERB_REFRESH Determines whether the currently selected scope item (folder) can be refreshed. Implemented by the user.
MMC_VERB_PRINT Determines whether the currently selected item can be printed. Implemented by the user.

nState
[in] Identifies the possible states of the button. Taken from the MMC_BUTTON_STATE enumeration, this value can be one of the following:
Value Meaning
ENABLED Enables the menu item so it can be selected and restores it from its grayed state.
HIDDEN Hides the button in the toolbar or item in the menu.

bState
[in] This value is TRUE to enable or hide the verb. FALSE to disable or show the selected verb.

Return Values

S_OK
The button's attribute was successfully set.

Remarks

Every time an item is selected, the verb states for all the commands are returned to disabled and visible. It is up to the snap-in writer to update the verb state every time an item is selected.

See Also

IConsoleVerb