Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IToolbar::SetButtonState method

The IToolbar::SetButtonState method enables a snap-in to set an attribute of a button.

Syntax


HRESULT SetButtonState(
  [inint              idCommand,
  [in] MMC_BUTTON_STATE nState,
  [in] BOOL             bState
);

Parameters

idCommand [in]

A unique value that the snap-in has associated with a button using the InsertButton or AddButtons method using the MMCBUTTON structure.

nState [in]

A value that specifies the state to be set for the button. Can be any 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.

bState [in]

A value that 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 clears the state (if it is already set).

Return value

This method can return one of these values.

S_OK

The button attribute was successfully set.

E_FAIL

The nState parameter specifies an invalid state or the state could not be changed.

Remarks

Snap-ins should not set button states until the toolbar has been attached using IControlbar::Attach.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IToolbar

 

 

Show: