Toolbar Extended Styles

This section lists the extended styles supported by toolbar controls.

Constant Description
TBSTYLE_EX_DRAWDDARROWS
Version 4.71. This style allows buttons to have a separate dropdown arrow. Buttons that have the BTNS_DROPDOWN style will be drawn with a dropdown arrow in a separate section, to the right of the button. If the arrow is clicked, only the arrow portion of the button will depress, and the toolbar control will send a TBN_DROPDOWN notification code to prompt the application to display the dropdown menu. If the main part of the button is clicked, the toolbar control sends a WM_COMMAND message with the button's ID. The application normally responds by launching the first command on the menu.
There are many situations where you may want to have only some of the dropdown buttons on a toolbar with separated arrows. To do so, set the TBSTYLE_EX_DRAWDDARROWS extended style. Give those buttons that will not have separated arrows the BTNS_WHOLEDROPDOWN style. Buttons with this style will have an arrow displayed next to the image. However, the arrow will not be separate and when any part of the button is clicked, the toolbar control will send a TBN_DROPDOWN notification code. To prevent repainting problems, this style should be set before the toolbar control becomes visible.
TBSTYLE_EX_HIDECLIPPEDBUTTONS
Version 5.81. This style hides partially clipped buttons. The most common use of this style is for toolbars that are part of a rebar control. If an adjacent band covers part of a button, the button will not be displayed. However, if the rebar band has the RBBS_USECHEVRON style, the button will be displayed on the chevron's dropdown menu.
TBSTYLE_EX_DOUBLEBUFFER
Version 6. This style requires the toolbar to be double buffered. Double buffering is a mechanism that detects when the toolbar has changed.
Note: Comctl32.dll version 6 is not redistributable but it is included in Windows or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.
TBSTYLE_EX_MIXEDBUTTONS
Version 5.81. This style allows you to set text for all buttons, but only display it for those buttons with the BTNS_SHOWTEXT button style. The TBSTYLE_LIST style must also be set. Normally, when a button does not display text, your application must handle TBN_GETINFOTIP or TTN_GETDISPINFO to display a tooltip. With the TBSTYLE_EX_MIXEDBUTTONS extended style, text that is set but not displayed on a button will automatically be used as the button's tooltip text. Your application only needs to handle TBN_GETINFOTIP or or TTN_GETDISPINFO if it needs more flexibility in specifying the tooltip text.
TBSTYLE_EX_MULTICOLUMN
Version 5.82. Intended for internal use; not recommended for use in applications. This style gives the toolbar a vertical orientation and organizes the toolbar buttons into columns. The buttons flow down vertically until a button has exceeded the bounding height of the toolbar (see TB_SETBOUNDINGSIZE), and then a new column is created. The toolbar flows the buttons in this manner until all buttons are positioned. To use this style, the TBSTYLE_EX_VERTICAL style must also be set.
Note: This style may not be supported in future versions of Comctl32.dll. Also, this style is not defined in commctrl.h. Add the following definition to the source files of your application to use this style: #define TBSTYLE_EX_MULTICOLUMN 0x00000002
TBSTYLE_EX_VERTICAL
Version 5.82. Intended for internal use; not recommended for use in applications. This style gives the toolbar a vertical orientation. Toolbar buttons flow from top to bottom instead of horizontally.
Note: This style may not be supported in future versions of Comctl32.dll. Also, this style is not defined in commctrl.h. Add the following definition to the source files of your application to use this style: #define TBSTYLE_EX_VERTICAL 0x00000004

Remarks

To set an extended style, send the toolbar control a TB_SETEXTENDEDSTYLE message. To determine what extended styles are currently set, send a TB_GETEXTENDEDSTYLE message.

Requirements

Requirement Value
Header
CommCtrl.h