SELFLAG
The SELFLAG constant describes how an accessible object becomes selected or takes focus. These values are used with the IAccessible::accSelect method.
typedef enum tagSELFLAG
{
SELFLAG_NONE = 0,
SELFLAG_TAKEFOCUS = 1,
SELFLAG_TAKESELECTION = 2,
SELFLAG_EXTENDSELECTION = 4,
SELFLAG_ADDSELECTION = 8,
SELFLAG_REMOVESELECTION = 16
} SELFLAG;
Members
SELFLAG_NONE
Performs no action. Active Accessibility does not change the selection or focus.SELFLAG_TAKEFOCUS
Sets the focus to the object and makes it the selection anchor. Used by itself, this flag does not alter the selection. The effect is similar to moving the focus manually by pressing the arrow keys while holding down the CTRL key in Windows Explorer or in any multiple-selection list box.With objects that have the STATE_SYSTEM_MULTISELECTABLE, SELFLAG_TAKEFOCUS is combined with the following values:
- SELFLAG_TAKESELECTION
- SELFLAG_EXTENDSELECTION
- SELFLAG_ADDSELECTION
- SELFLAG_REMOVESELECTION
- SELFLAG_ADDSELECTION | SELFLAG_EXTENDSELECTION
- SELFLAG_REMOVESELECTION | SELFLAG_EXTENDSELECTION
If you call IAccessible::accSelect with the SELFLAG_TAKEFOCUS flag on an object that has an HWND, the flag takes effect only if the object's parent already has the focus.
SELFLAG_TAKESELECTION
Selects the object and removes the selection from all other objects in the container.This flag does not change the focus or the selection anchor unless it is combined with SELFLAG_TAKEFOCUS. The SELFLAG_TAKESELECTION | SELFLAG_TAKEFOCUS combination is equivalent to single-clicking an item in Windows Explorer.
This flag must not be combined with the following flags:
- SELFLAG_ADDSELECTION
- SELFLAG_REMOVESELECTION
- SELFLAG_EXTENDSELECTION
SELFLAG_EXTENDSELECTION
Alters the selection so that all objects between the selection anchor and this object take on the anchor object's selection state. If the anchor object is not selected, the objects are removed from the selection. If the anchor object is selected, the selection is extended to include this object and all the objects in between. Set the selection state by combining this flag with SELFLAG_ADDSELECTION or SELFLAG_REMOVESELECTION.This flag does not change the focus or the selection anchor unless it is combined with SELFLAG_TAKEFOCUS. The SELFLAG_EXTENDSELECTION | SELFLAG_TAKEFOCUS combination is equivalent to adding an item to a selection manually by holding down the SHIFT key and clicking an unselected object in Windows Explorer.
This flag is not combined with SELFLAG_TAKESELECTION.
SELFLAG_ADDSELECTION
Adds the object to the current selection; possible result is a noncontiguous selection.This flag does not change the focus or the selection anchor unless it is combined with SELFLAG_TAKEFOCUS. The SELFLAG_ADDSELECTION | SELFLAG_TAKEFOCUS combination is equivalent to adding an item to a selection manually by holding down the CTRL key and clicking an unselected object in Windows Explorer.
This flag is not combined with SELFLAG_REMOVESELECTION or with SELFLAG_TAKESELECTION.
SELFLAG_REMOVESELECTION
Removes the object from the current selection; possible result is a noncontiguous selection.This flag does not change the focus or the selection anchor unless it is combined with SELFLAG_TAKEFOCUS. The SELFLAG_REMOVESELECTION | SELFLAG_TAKEFOCUS combination is equivalent to removing an item from a selection manually by holding down the CTRL key while clicking a selected object in Windows Explorer.
This flag is not combined with SELFLAG_ADDSELECTION or SELFLAG_TAKESELECTION.
Remarks
For information on how to perform complex selection operations, see Selecting Child Objects.
In summary, the following flag combinations are not allowed:
- SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION
- SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION
- SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION
- SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION
Note to clients Active Accessibility does not support the selection of the text contained in edit and rich edit controls because the text is exposed as a string in the object's Value property.
Requirements
** Windows NT/2000/XP/Server 2003:** Included in Windows 2000 and later.
** Windows 95/98/Me:** Included in Windows 98 and later.
** Redistributable:** Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
** Header:** Declared in Oleacc.h.