Expand Minimize
This topic has not yet been rated - Rate this topic

CToolBarCtrl::GetState

Retrieves information about the state of the specified button in a toolbar control, such as whether it is enabled, pressed, or checked.

int GetState( 
   int nID  
) const;
nID

Command identifier of the button for which to retrieve information.

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

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.

Header: afxcmn.h

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.