Toolbar Control

A toolbar control contains buttons that carry out menu commands and is usually contained within a window below the menu bar.

The window class name for a toolbar control is TOOLBARCLASSNAME, which is defined as "ToolbarWindow32" in Commctrl.h.

Supported Properties and Methods

accDoDefaultAction
The toolbar itself does support the DefaultAction method. For the buttons on the toolbar, DoDefaultAction calls PostMessage with the BN_CLICK message to click the specified button.
accHitTest
accLocation
accNavigate
accSelect
get_accChild
get_accChildCount
The ChildCount property is the number of controls contained in the toolbar.
get_accDefaultAction
The toolbar object itself does not have a DefaultAction property. The DefaultAction property for toolbar buttons depends on the toolbar button style. Buttons with the style TBSTYLE_DROPDOWN have "Open" as their DefaultAction property. The DefaultAction property for all other toolbar buttons is "Press".
get_accDescription
get_accFocus
get_accHelp
get_accHelpTopic
get_accKeyboardShortcut
Toolbars do not have keyboard shortcuts. However, if the window text for the toolbar contains an ampersand (&) character, Active Accessibility returns a non-Null string as the KeyboardShortcut property.
get_accName
The Name property for the toolbar is obtained from the control's window text (or caption). This text is not displayed with the toolbar, so server developers must provide meaningful text in the control's resource definition statement to help users of client utilities identify the control.
get_accParent
The Parent property is a window (ROLE_SYSTEM_WINDOW) that surrounds the control and has the same Name property and window class name as the control.
get_accRole
The Role property is ROLE_SYSTEM_TOOLBAR.
get_accSelection
get_accState
The value for the State property for the toolbar itself is zero, which means the object is visible. Possible values for the State property of the toolbar buttons are:

STATE_SYSTEM_INVISIBLE or

STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_MOVEABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE

Events Generated

EVENT_OBJECT_CREATE

EVENT_OBJECT_DESTROY

EVENT_OBJECT_REORDER

EVENT_OBJECT_STATECHANGE

Remarks

The buttons on a toolbar send EVENT_OBJECT_STATECHANGE events.

See Also

IAccessible Interface

Community Additions

Show: