Skip to content

An AI Agent that interacts with Windows OS at GUI level.

Python
1.5 KB
Raw Blame

GetFocus

Original Documentation

IRawElementProviderFragmentRoot::GetFocus method (uiautomationcore.h)

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

Syntax

HRESULT GetFocus(
  [out, retval] IRawElementProviderFragment **pRetVal
);

Parameters

[out, retval] 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

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

See also

IRawElementProviderFragmentRoot