IToolbar::GetButtonState method (mmc.h)

The IToolbar::GetButtonState method enables a snap-in to obtain an attribute of a button.

Syntax

HRESULT GetButtonState(
  [in]  int              idCommand,
  [in]  MMC_BUTTON_STATE nState,
  [out] BOOL             *pState
);

Parameters

[in] idCommand

The command identifier of the toolbar button.

[in] nState

A value that identifies the possible states of the button. Can be one of the following:

ENABLED

The button accepts user input. A button that does not have this state does not accept user input and appears dimmed.

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 appears dimmed.

BUTTONPRESSED

The button is being pressed.

[out] pState

A pointer to the state information that is returned.

Return value

This method can return one of these values.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
DLL Mmcndmgr.dll

See also

IToolbar