WindowFromAccessibleObject function (oleacc.h)

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

Syntax

HRESULT WindowFromAccessibleObject(
  [in]  IAccessible *unnamedParam1,
  [out] HWND        *phwnd
);

Parameters

[in] unnamedParam1

Type: IAccessible*

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

[out] 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

Requirement Value
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