ToolBar Control Styles

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at ToolBar Control Styles.

CMFCToolBarButton Class](../Topic/CMFCToolBarButton%20Class.md) has a set of style flags that determine the appearance and behavior of the button. You can set a combination of these flags by calling CMFCToolBarButton::SetStyle. This topic lists the style flag values and their meanings.

The following values determine the type of button that the control represents:

TBBS_BUTTON
Standard pushbutton (default).

TBBS_CHECKBOX
Check box.

TBBS_CHECKGROUP
The start of a group of checkboxes.

TBBS_GROUP
The start of a group of buttons.

TBBS_SEPARATOR
Separator.

The following values represent the current status of the control:

TBBS_CHECKED
Check box is checked.

TBBS_DISABLED
Control is disabled.

TBBS_INDETERMINATE
Check box is in an indeterminate state.

TBBS_PRESSED
Button is pressed.

The following value changes the layout of the button in the toolbar:

TBBS_BREAK
Places the item on a new line or in a new column without separating columns.

The current style is stored in CMFCToolBarButton::m_nStyle. Do not set a new value in m_nStyle directly, because some derived classes perform additional processing when you call SetStyles.

The visual manager determines the appearance of buttons in each state. See Visualization Manager for more information.

Header: afxtoolbarbutton.h

Macros and Globals
CMFCToolBarButton Class
Visualization Manager

Show: