Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UiaProviderForNonClient function

Gets the provider for the entire non-client area of a window, or for a control in the non-client area of a window.


HRESULT UiaProviderForNonClient(
  _In_  HWND                      hwnd,
  _In_  long                      idObject,
  _In_  long                      idChild,
  _Out_ IRawElementProviderSimple **pProvider


hwnd [in]

Type: HWND

The window that owns the non-client area or non-client control.

idObject [in]

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.

idChild [in]

Type: long

The child identifier of the non-client control.

pProvider [out]

Type: IRawElementProviderSimple**

Receives the provider for the non-client area or non-client control.

Return value


Returns S_OK if successful or an error value otherwise.


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.


Minimum supported client

Windows 8 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 [desktop apps | UWP apps]







See also

Functions for Providers



© 2018 Microsoft