IRawElementProviderFragmentRoot::GetFocus method

Retrieves the element in this fragment that has the input focus.

Syntax

HRESULT GetFocus(
  IRawElementProviderFragment **pRetVal
);

Parameters

pRetVal

Type: IRawElementProviderFragment**

Receives a pointer to the IRawElementProviderFragment interface of the element in this fragment that has the input focus, if any; otherwise NULL. This parameter is passed uninitialized.

Return Value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See Also

IRawElementProviderFragmentRoot