UiaProviderForNonClient function (uiautomationcoreapi.h)
Gets the provider for the entire non-client area of a window, or for a control in the non-client area of a window.
Syntax
HRESULT UiaProviderForNonClient(
[in] HWND hwnd,
[in] long idObject,
[in] long idChild,
[out] IRawElementProviderSimple **ppProvider
);
Parameters
[in] hwnd
Type: HWND
The window that owns the non-client area or non-client control.
[in] idObject
Type: long
The object identifier of the non-client control, or OBJID_WINDOW for the entire non-client area. For a list of possible values, see Object Identifiers.
[in] idChild
Type: long
The child identifier of the non-client control.
[out] ppProvider
Type: IRawElementProviderSimple**
Receives the provider for the non-client area or non-client control.
Return value
Type: HRESULT
Returns S_OK if successful or an error value otherwise.
Remarks
This function returns the default Microsoft UI Automation provider for the non-client area of a window. UI Automation supports the non-client area without any explicit help from the window. You can override and customize the support by using the IRawElementProviderSimple interface that is retrieved by this function.
This function is particularly useful when you use it with the ProviderOptions_RefuseNonClientSupport flag, which disables the UI Automation default provider for the non-client area so that the window can supply its own provider.
The supported object IDs for controls in the non-client area include OBJID_WINDOW, OBJID_VSCROLL, OBJID_HSCROLL, OBJID_TITLEBAR, OBJID_MENU, and OBJID_SIZEGRIP. For OBJID_TITLEBAR, use the child ID to distinguish between the entire title bar and the buttons that it contains.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | uiautomationcoreapi.h |
Library | Uiautomationcore.lib |
DLL | Uiautomationcore.dll |