IToolbar::SetButtonState

[This is preliminary documentation and subject to change.]

Enables a snap-in to set an attribute of a button.

HRESULT SetButtonState(
  int idCommand,            // Command identifier
  MMC_BUTTON_STATE nState,  // State of the button
  BOOL bState               // Sets the button state
);
 

Parameters

idCommand
[in] Unique value that the user has associated with a button using the InsertButton or AddButtons method using the MMCBUTTON structure.
nState
[in] Specifies the state of the button you want to set. Can be one of the following:
Value Meaning
ENABLED The button accepts user input. A button that does not have this state does not accept user input and is grayed.
CHECKED The button has the CHECKED style and is being pressed.
HIDDEN The button is not visible and cannot receive user input.
INDETERMINATE The button is grayed.
BUTTONPRESSED The button is being pressed.

bState
[in] Specifies whether the state identified in nState is set to TRUE or FALSE. TRUE sets the button state to the state identified by nState and FALSE unsets the state (if already set).

Return Values

S_OK
The button's attribute was successfully set.

See Also

IToolbar