Toolbar Control (MSAA UI Element Reference)
Note
This topic describes Toolbar Control objects for purposes of MSAA UI Element Reference. How to create Toolbar Control objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.
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.
IAccessible Methods
A toolbar control supports the following IAccessible methods:
Method | Comments |
---|---|
accDoDefaultAction | The toolbar itself does support the accDoDefaultAction method. For the buttons on the toolbar, accDoDefaultAction calls PostMessage with the BM_CLICK message to click the specified button. |
accHitTest | |
accLocation | |
accNavigate | |
accSelect |
IAccessible Properties
A toolbar control supports the following IAccessible properties:
Property | Comments |
---|---|
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, Microsoft 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. The window text can be set by using the SetWindowText function. |
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 |
Notes
The buttons on a toolbar send EVENT_OBJECT_STATECHANGE events.