IAccPropServices::SetHwndProp method (oleacc.h)

This method wraps SetPropValue, providing a convenient entry point for callers who are annotating HWND-based accessible elements. If the new value is a string, you can use IAccPropServices::SetHwndPropStr instead.

Syntax

HRESULT SetHwndProp(
  [in] HWND       hwnd,
  [in] DWORD      idObject,
  [in] DWORD      idChild,
  [in] MSAAPROPID idProp,
  [in] VARIANT    var
);

Parameters

[in] hwnd

Type: HWND

Identifies the accessible element that is to be annotated. This replaces the identity string.

[in] idObject

Type: DWORD

Identifies the accessible element that is to be annotated. This replaces the identity string.

[in] idChild

Type: DWORD

Identifies the accessible element that is to be annotated. This replaces the identity string.

[in] idProp

Type: MSAAPROPID

Specifies which property of that element is to be annotated.

[in] var

Type: VARIANT

Specifies a new value for that property.

Return value

Type: HRESULT

If successful, returns S_OK.

Returns E_INVALIDARG if the idProp property is not supported.

May return other error codes under exceptional error conditions such as low memory.

Remarks

By using this method, the caller does not have to obtain an identity string; it can specify the hwnd, idObject, and idChild parameters directly.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header oleacc.h (include OleAcc.h Include Initguid.h first.)
DLL Oleacc.dll
Redistributable Active Accessibility 2.0 RDK on Windows NT 4.0 with SP6 and later and Windows 98

See also

ClearHwndProps

IAccPropServices

SetHwndPropServer

SetHwndPropStr

SetPropValue