Share via


WindowFromAccessibleObject

The WindowFromAccessibleObject function retrieves the window handle that corresponds to a given instance of an IAccessible interface.

STDAPI WindowFromAccessibleObject(
IAccessible* pacc,HWND* phwnd);

Parameters

  • pacc
    [in] Pointer to the IAccessible interface whose corresponding window handle will be retrieved. This parameter must not be NULL.
  • phwnd
    [out] Address of a variable that receives a handle to the window containing the object specified in pacc. If this value is NULL after the call, the object was not contained within a window. (For example, the mouse pointer is not contained within a window.)

Return Values

If successful, returns S_OK.

If not successful, returns the following or another standard COM error code.

Error Description
E_INVALIDARG An argument is invalid.

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.
**  Library:** Use Oleacc.lib.

See Also

IAccessible, AccessibleObjectFromWindow