IAccPropServices::SetHwndProp
This method wraps SetPropValue, providing a convenient entry point for callers who are annotating Hwnd-based objects. If the new value is a string, you can use IAccPropServices::SetHwndPropStr instead.
HRESULT SetHwndProp (
HWND hwnd, DWORD idObject, DWORD idChild, MSAAPROPID idProp, VARIANT var);
Parameters
- hwnd, idObject, idChild
[in] Identifies the accessible element that is to be annotated. This replaces the identity string. - idProp
[in] Specifies which property of that element is to be annotated. - var
[in] Specifies a new value for that property.
Return Values
If successful, returns S_OK.
Returns E_INVALIDARG if any of the properties in the paProps array are not supported properties, if the identity string is not valid, or if annoScope is not one of ANNO_THIS or ANNO_CONTAINER.
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
** Windows NT/2000/XP/Server 2003:** Included in Windows XP and Windows Server 2003.
** Windows 95/98/Me:** Unsupported.
** Redistributable:** Requires Active Accessibility 2.0 RDK on Windows NT 4.0 SP6 and Windows 98.
** Header:** Declared in Oleacc.h; include Initguid.h before including Oleacc.h.
See Also
ClearHwndProps, SetHwndPropServer, SetHwndPropStr, SetPropValue