Dialog Box (MSAA UI Element Reference)

Note

This topic describes Dialog Box objects for purposes of MSAA UI Element Reference. How to create Dialog Box objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.

A dialog box is a temporary window that an application creates to retrieve user input. An application uses dialog boxes to prompt the user for additional information about commands that the user has chosen from a menu. A dialog box contains one or more controls (child windows) with which the user enters text, chooses options, or directs the action of the command.

The window class name for dialog boxes is "#32770".

IAccessible Methods

A dialog box supports the following IAccessible methods:

Method Comments
accDoDefaultAction If the dialog box contains a default push button, the accDoDefaultAction method calls PostMessage with the BM_CLICK button message to click the default push button.
accHitTest
accLocation
accNavigate
accSelect

IAccessible Properties

A dialog box supports the following IAccessible properties:

Property Comments
get_accChildCount The ChildCount property is equal to the number of child window controls on the dialog box.
get_accDefaultAction If the dialog box contains a default push button, the DefaultAction property is "Press".
get_accFocus
get_accKeyboardShortcut Typically, dialog boxes do not have keyboard shortcuts. If the window text for the dialog box contains an ampersand (&) character, Microsoft Active Accessibility returns a non-Null string as the KeyboardShortcut property.
get_accName The Name property is the window text, or caption, that is displayed in the title bar of the dialog box.
get_accParent The Parent property is a window ( ROLE_SYSTEM_WINDOW ) that surrounds the dialog box and has the same Name property and window class name as the dialog box.
get_accRole The Role property is ROLE_SYSTEM_DIALOG or ROLE_SYSTEM_PROPERTYPAGE.
get_accState The State property is a combination of one or more of the following values:STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE

Remarks

The dialog object does not support the get_accChild method. To obtain an IAccessible interface pointer to a control on a dialog box, clients must obtain the window handle of the control and then call AccessibleObjectFromWindow.

IAccessible Interface