WindowFromAccessibleObject function

Retrieves the window handle that corresponds to a particular instance of an IAccessible interface.

Syntax

HRESULT WindowFromAccessibleObject(
  IAccessible *,
  HWND        *phwnd
);

Parameters

arg1

Type: IAccessible*

Pointer to the IAccessible interface whose corresponding window handle will be retrieved. This parameter must not be NULL.

phwnd

Type: HWND*

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 is not contained within a window; for example, the mouse pointer is not contained within a window.

Return Value

Type: STDAPI

If successful, returns S_OK.

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

Return code Description
E_INVALIDARG
An argument is not valid.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header oleacc.h
Library Oleacc.lib
DLL Oleacc.dll
Redistributable Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95

See Also

AccessibleObjectFromWindow

IAccessible