IMenuButton::SetButtonState method (mmc.h)
The IMenuButton::SetButtonState method enables a user to change the state of a menu button.
Syntax
HRESULT SetButtonState(
[in] int idCommand,
[in] MMC_BUTTON_STATE nState,
[in] BOOL bState
);
Parameters
[in] idCommand
A value that specifies a user-supplied value that uniquely identifies the menu button in which the state is being changed.
[in] nState
A value that specifies the state of the button. This value can be one of the following values taken from the MMC_BUTTON_STATE enumeration:
ENABLED
The button accepts user input. A button that does not have this state does not accept user input and appears dimmed.
HIDDEN
The button is not visible and cannot receive user input.
[in] bState
A value that specifies whether the state is to be turned on or off. TRUE indicates that the button state is on; otherwise, set to FALSE.
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 |