## Appendix E - User Interface Controls

These controls are provided by the system and COMCTL32 and are used throughout Windows 95 and applications written for it.

Note: This refers only to controls exposed by COMCTL32.DLL, not 16-bit controls. At present Active Accessibility does not support the 16-bit versions (mainly status bar and toolbar). Also, keep in mind that edits, statics, titlebars, buttons, (may be others) have a limit of 4096 bytes of text they will return

Animation

- Properties and Methods
- Events

Button

- Properties and Methods

  DefaultAction is "Press"

  DoDefaultAction presses the button as if a user clicked on it.

- Events

Check Boxes

- Properties and Methods

  DefaultAction is "Check" if unchecked, "Uncheck" if checked

  DoDefaultAction checks or unchecks the check box

ComboBox

- Properties and Methods

  DefaultAction is "Drop down" if combo list is hidden, or "Pop up" if shown.

  DoDefaultAction shows or hides the list

- Events

Edit

- Properties and Methods
- Events

Header

- Properties and Methods
- Events
  - CREATE when header is added
  - DESTROY when header is removed
  - REORDER when the columns are rearranged

HotKey

- Properties and Methods
- Events
  - VALUECHANGE when the hot key changes

ListBox

- Properties and Methods
- Events

ListView

- Properties and Methods
- Events
  - CREATE when item added
  - DESTROY when item deleted
  - FOCUS when the item with the caret changes
  - NAMECHANGE when the name of an item is changed
  - SELECTION when one item is selected
  - SELECTIONADD for multiselect list view controls (when another item is added to the selection).
  - SELECTIONREMOVE for multiselect list views when an item is deselected

  Notes:

  - OWNERDRAW list views might not give you back item text.
  - On the CREATE for some list view items, you might get no text (but it will show up later), because of the LPSTR_CALLBACK option, there's no way to know when this happens.
  - Most applications add in toolbar buttons groups at a time, in which case you'll see REORDER instead of a ton of creates. But VB and MFC do it one at a time, so we do generate a CREATE in that case.

ProgressBar

- Properties and Methods
- Events
  - VALUECHANGE when the position changes

Radio Buttons

- Properties and Methods

  DoDefaultAction selects the radio button, deselecting the others in a group.

Note: This works only when the radio buttons have the BS_AUTORADIOBUTTON style set.

RichEdit

- Properties and Methods
- Events

ScrollBar

- Properties and Methods
- Events

Slider

- Properties and Methods
- Event
  - VALUECHANGE when the thumb moves

Spin Buttons

- Properties and Methods
- Events
  - STATECHANGE when a button is pressed, released
  - VALUECHANGE when the position in the buddy changes

Static

- Properties and Methods
- Events

StatusBar

- Events
  - NAMECHANGE when the contents of a status bar slot change

TabControl

- Properties and Methods

  DefaultAction is "Switch"

  DoDefaultAction selects the tab

- Events
  - CREATE when a tab is added to the list
  - DESTROY when a tab is removed from the list
  - FOCUS/SELECTION when the currently active tab changes

Toolbar

- Properties and Methods
- Events
  - CREATE or REORDER when one or several buttons are added
  - DESTROY when a button is removed
  - STATECHANGE for the buttons when pressed, released, enabled, disabled

  Please Note : the problem with toolbars is that they aren't supposed to have children who are windows. They don't even support it very well as a hack. What someone designing an app with a toolbar has to do if they want a real window on it is to scoot all the buttons (the "real" children of the toolbar) over to the right, and then place their window. So Active Accessibility does a similar hack. When you are doing Next or Previous, it checks if you started at a child that has an HWNDID. If so, it gives back the first child (if doing NEXT) or the toolbar itself (if PREVIOUS).

  Also, if you start at the toolbar itself and are going next, it will check if there is a child window, and if so, return an IDispatch to the window in the VARIANT. If you start at the first "real" child and go previous, it will do the same thing - check for a child window and return an IDispatch to it if it is there.

  This is a major limitation in that this will only work for toolbars that have 0 or 1 children that are windows themselves.

ToolTips

- Properties and Methods

  Name

  Role

  Value

- Events

TreeView

- Properties and Methods
- Events
  - CREATE when item added
  - DESTROY when item deleted
  - FOCUS when caret changes
  - NAMECHANGE when item renamed
  - SELECTION when selected item changes
  - STATECHANGE when item expanded or collapsed
- Notes
  - The role of the tree view is ROLE_SYSTEM_OUTLINE; the items' roles are ROLE_SYSTEM_OUTLINEITEM.
  - All items, regardless of their position in the hierarchy, are peer children of the tree view
  - The value of an item is the "indent level". So, for example, the value of the "Desktop" item would be zero because it is the root.
  - A tool can use the value to figure out which items are logically grouped under another. If you have an item, ask for the next one. If that next one's value is <= the value of the start item, you are done. If the item has a value of one greater than the start, it must be a logical item directly underneath. In other words, the value is the indent level.
  - Items that are expandable and collapsible are the only ones with default action. If an item is expanded, the default action is to collapse it. If an item is collapsed, the default action is to expand it

© 1997 Microsoft Corporation. All rights reserved. Legal Notices.