Contents Index Topic Contents | ||
Previous Topic: Toolbar Control Reference Next Topic: Toolbar Extended Styles |
Toolbar Control and Button Styles
A toolbar control can have a combination of the following styles:
TBSTYLE_ALTDRAG Allows users to change a toolbar button's position by dragging it while holding down ALT. If this style is not specified, the user must hold down SHIFT while dragging a button. Note that the CCS_ADJUSTABLE style must be specified to enable toolbar buttons to be dragged. TBSTYLE_CUSTOMERASE Version 4.70. Generates NM_CUSTOMDRAW notification messages when it processes WM_ERASEBKGND messages. TBSTYLE_FLAT Version 4.70. Creates a flat toolbar. In a flat toolbar, both the toolbar and the buttons are transparent. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible. TBSTYLE_LIST Version 4.70. Places button text to the right of button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible. TBSTYLE_REGISTERDROP Version 4.71. Generates TBN_GETOBJECT notification messages to request drop target objects when the pointer passes over toolbar buttons. TBSTYLE_TOOLTIPS Creates a tooltip control that an application can use to display descriptive text for the buttons in the toolbar. TBSTYLE_TRANSPARENT Version 4.71. Creates a transparent toolbar. In a transparent toolbar, the toolbar is transparent but the buttons are not. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible. TBSTYLE_WRAPABLE Creates a toolbar that can have multiple lines of buttons. Toolbar buttons can "wrap" to the next line when the toolbar becomes too narrow to include all buttons on the same line. Wrapping occurs on separation and nongroup boundaries. A button in a toolbar can have a combination of the following styles. Not all styles can be combined.
TBSTYLE_AUTOSIZE Version 4.71. The button's width will be calculated based on the text of the button, not on the size of the image. TBSTYLE_BUTTON Creates a standard push button. TBSTYLE_CHECK Creates a button that toggles between the pressed and nonpressed states each time the user clicks it. The button has a different background color when it is in the pressed state. TBSTYLE_CHECKGROUP Creates a check button that stays pressed until another button in the group is pressed. TBSTYLE_DROPDOWN Version 4.70. Creates a drop-down list button. Drop-down buttons send the TBN_DROPDOWN notification. If the toolbar has the TBSTYLE_EX_DRAWDDARROWS extended style, drop-down buttons will have a drop-down arrow displayed next to them. TBSTYLE_GROUP Creates a button that stays pressed until another button in the group is pressed. TBSTYLE_NOPREFIX Version 4.71. The button text will not have an accelerator prefix associated with it. TBSTYLE_SEP Creates a separator, providing a small gap between button groups. A button that has this style does not receive user input.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.