IUIAutomationTextRange3::GetChildrenBuildCache 方法 (uiautomationclient.h)

在单个跨进程调用中返回文本范围中元素的子级和提供的属性和模式。 这等效于调用 GetChildren,但会添加标准生成缓存模式。

语法

HRESULT GetChildrenBuildCache(
  [in]          IUIAutomationCacheRequest *cacheRequest,
  [out, retval] IUIAutomationElementArray **children
);

参数

[in] cacheRequest

指定要缓存的属性和控件模式的 IUIAutomationCacheRequest

[out, retval] children

返回满足提供的 cacheRequest 条件的文本范围的子级和每个子级的属性或模式。

返回值

如果成功 则返回S_OK,否则返回 HRESULT 错误代码。

注解

遵循 GetChildren 的设计:

  • 还将包含与文本范围重叠但不完全包含在文本范围中的子级。
  • 如果不存在子级,则返回空集合。
成功调用后,UI 自动化客户端能够调用 cacheRequest 中提供的 IUIAutomationElement 的“Cached”API,例如 IUIAutomationElement::GetCachedPropertyValue

要求

要求
最低受支持的客户端 Windows 10版本 1703 [仅限桌面应用]
最低受支持的服务器 无受支持的版本
目标平台 Windows
标头 uiautomationclient.h (包括 UIAutomation.h)

另请参阅

IUIAutomationTextRange3

对文本内容的UI 自动化支持