The IAccessible::get_accSelection method retrieves the selected children of this object. All objects that support selection must support this property.
For more information about COM parameter attributes, allocating memory, and freeing memory, see Definitions of Parameter Attributes.
HRESULT get_accSelection( VARIANT* pvarChildren );
[out, retval] Address of a VARIANT structure that receives information about which children are selected. The following table describes the information returned in pvarChildren.
vt member Value member VT_EMPTY No children are selected. VT_DISPATCH One child object is selected, and the address of its IDispatch interface is set in the pdispVal member. VT_I4 lVal contains the child ID of the child element that is selected. If lVal is CHILDID_SELF, then the object itself is selected. VT_UNKNOWN Multiple child objects are selected and the punkVal member contains the address of the IUnknown interface. The client queries this interface for the IEnumVARIANT interface, which it uses to enumerate the selected objects.
If successful, returns S_OK.
If not successful, returns the following value or another standard COM error code. Although servers return these values, clients must always check output parameters to ensure that they contain valid values. For more information, see Checking IAccessible Return Values.
|VT_EMPTY||Neither the object nor any of its children is selected.|
|DISP_E_MEMBERNOTFOUND||The object does not support this property.|
This method must support the IEnumVARIANT interface.
This method returns either an IDispatch interface pointer or a child ID for the *pvarID. For more information about how to use the IDispatch interface pointer or child ID, see How Child IDs Are Used in Parameters.
As with other IAccessible methods and functions, clients might receive errors for IAccessible interface pointers because of a user action. For more information, see Receiving Errors for IAccessible Interface Pointers.
Note to clients Active Accessibility does not expose the text selection in edit and rich edit controls.
** 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.
** Library:** Use Oleacc.lib.