CToolBarCtrl::GetState

intGetState(intnID**) const;**

Return Value

The button state information if successful or – 1 otherwise. The button state information can be a combination of the values listed in CToolBarCtrl::AddButtons.

Parameters

nID

Command identifier of the button for which to retrieve information.

Remarks

Call this function to retrieve information about the state of the specified button in a toolbar control, such as whether it is enabled, pressed, or checked.

This function is especially handy if you want to retrieve more than one of the button states. To just retrieve one state, use one of the following member functions: IsButtonEnabled, IsButtonChecked, IsButtonPressed, IsButtonHidden, or IsButtonIndeterminate. However, the GetState member function is the only way to detect the TBSTATE_WRAP button state.

CToolBarCtrl OverviewClass MembersHierarchy Chart

See Also   CToolBarCtrl::SetState, CToolBarCtrl::GetItemRect, CToolBarCtrl::IsButtonEnabled, CToolBarCtrl::IsButtonChecked, CToolBarCtrl::IsButtonPressed, CToolBarCtrl::IsButtonHidden, CToolBarCtrl::IsButtonIndeterminate