Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IUIAutomationTreeWalker::GetFirstChildBuildCache Method

Retrieves the first child element of the specified UI Automation element, and caches properties and control patterns.

Syntax


HRESULT GetFirstChildBuildCache(          IUIAutomationElement *element,
    IUIAutomationCacheRequest *cacheRequest,
    IUIAutomationElement **first
);

Parameters

element
[in] The address of the IUIAutomationElement interface of the element for which to retrieve the first child.
cacheRequest
[in] The address of the IUIAutomationCacheRequest interface of a cache request that specifies the properties and control patterns to cache on the returned element.
first
[out, retval] The address of a variable that receives a pointer to the IUIAutomationElement interface of the first child element, or NULL if there is no child element.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

An element can have additional child elements that do not match the current view condition and thus are not returned when navigating the element tree.

The structure of the Microsoft UI Automation tree changes as the visible UI elements on the desktop change. It is not guaranteed that an element returned as the first child element will be returned as the first child on subsequent passes.

Community Additions

Show:
© 2015 Microsoft