IAccPropServices::SetHwndPropServer
This method wraps SetPropServer, providing a convenient entry point for callers who are annotating Hwnd-based objects.
HRESULT SetHwndPropServer (
HWND hwnd, DWORD idObject, DWORD idChild, const MSAAPROPID* paProps, int cProps, IAccPropServer* pServer, AnnoScope annoScope);
Parameters
- hwnd, idObject, idChild
[in] Identifies the accessible element that is to be annotated. This replaces the identity string. - paProps, cProps
[in] Specifies an array of properties that is to be handled by the specified callback object. - pServer
[in] Specifies the callback object, which will be invoked when a client requests one of the overridden properties. - annoScope
[in] May be ANNO_THIS, indicating that the annotation affects the indicated accessible element only; or ANNO_CONTAINER, indicating that it applies to the element and its immediate element children.
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.