Skip to content

Latest commit

 

History

History
81 lines (63 loc) · 4.35 KB

nf-uiautomationclient-iuiautomationtreewalker-normalizeelement.md

File metadata and controls

81 lines (63 loc) · 4.35 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:uiautomationclient.IUIAutomationTreeWalker.NormalizeElement
IUIAutomationTreeWalker::NormalizeElement (uiautomationclient.h)
Retrieves the ancestor element nearest to the specified Microsoft UI Automation element in the tree view.
IUIAutomationTreeWalker interface [Windows Accessibility]
NormalizeElement method
IUIAutomationTreeWalker.NormalizeElement
IUIAutomationTreeWalker::NormalizeElement
NormalizeElement
NormalizeElement method [Windows Accessibility]
NormalizeElement method [Windows Accessibility]
IUIAutomationTreeWalker interface
uiauto.uiauto_IUIAutomationTreeWalker_Normalize
uiauto_IUIAutomationTreeWalker_Normalize
uiautomationclient/IUIAutomationTreeWalker::NormalizeElement
winauto.uiauto_IUIAutomationTreeWalker_Normalize
winauto\uiauto_IUIAutomationTreeWalker_Normalize.htm
WinAuto
62616711-a841-4273-8e38-0d2344659d03
12/05/2018
IUIAutomationTreeWalker interface [Windows Accessibility],NormalizeElement method, IUIAutomationTreeWalker.NormalizeElement, IUIAutomationTreeWalker::NormalizeElement, NormalizeElement, NormalizeElement method [Windows Accessibility], NormalizeElement method [Windows Accessibility],IUIAutomationTreeWalker interface, uiauto.uiauto_IUIAutomationTreeWalker_Normalize, uiauto_IUIAutomationTreeWalker_Normalize, uiautomationclient/IUIAutomationTreeWalker::NormalizeElement, winauto.uiauto_IUIAutomationTreeWalker_Normalize
uiautomationclient.h
UIAutomation.h
Windows
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]
UIAutomationClient.idl
Windows
19H1
IUIAutomationTreeWalker::NormalizeElement
uiautomationclient/IUIAutomationTreeWalker::NormalizeElement
c++
APIRef
kbSyntax
COM
UIAutomationClient.h
IUIAutomationTreeWalker.NormalizeElement

IUIAutomationTreeWalker::NormalizeElement

-description

Retrieves the ancestor element nearest to the specified Microsoft UI Automation element in the tree view.

-parameters

-param element [in]

Type: IUIAutomationElement*

A pointer to the element from which to start the normalization.

-param normalized [out, retval]

Type: IUIAutomationElement**

Receives a pointer to the ancestor element nearest to the specified element in the tree view.

-returns

Type: HRESULT

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

-remarks

The element is normalized by navigating up the ancestor chain in the tree until an element that satisfies the view condition (specified by a previous call to IUIAutomationTreeWalker::Condition) is reached. But first, the passed element is tested to see if it matches a normalization condition. If so, the passed element is returned, even though it is not an ancestor.

The method returns UIA_E_ELEMENTNOTAVAILABLE if no matching element has been found.

This method is useful for applications that obtain references to UI Automation elements by hit-testing. The application might want to work only with specific types of elements, and can use IUIAutomationTreeWalker::Normalize to make sure that no matter what element is initially retrieved (for example, when a scroll bar gets the input focus), only the element of interest (such as a content element) is ultimately retrieved.