Dialog Box

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".

Supported Properties and Methods

  • accDoDefaultAction
    If the dialog box contains a default push button, the DoDefaultAction method calls PostMessage with the BM_CLICK button message to click the default push button.

  • accHitTest
    accLocation
    accNavigate
    accSelect
    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, 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

Events Generated

EVENT_SYSTEM_ALERT

EVENT_SYSTEM_DIALOGSTART

EVENT_SYSTEM_DIALOGEND

EVENT_OBJECT_DEFACTIONCHANGE

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.

These events are not sent consistently by the system. This is a known issue and is being addressed.

See Also

IAccessible Interface