IToolbar::GetButtonState

[This is preliminary documentation and subject to change.]

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

HRESULT GetButtonState(
  int idCommand,            // Command identifier of the button
  MMC_BUTTON_STATE nState,  // Structure of button attributes
  BOOL * pState             // Pointer to information returned.
);
 

Parameters

idCommand
[in] Command identifier of the toolbar button.
nState
[in] Identifies the possible states of the button. 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.

pState
[out] Pointer to the state information returned.

Return Values

S_OK
The button's attributes were successfully obtained.

See Also

IToolbar