UiaRaiseActiveTextPositionChangedEvent 函数 (uiautomationcoreapi.h)

由提供程序调用,以通知 Microsoft UI 自动化核心文本控件中的位置已以编程方式更改。

语法

HRESULT UiaRaiseActiveTextPositionChangedEvent(
  [in]           IRawElementProviderSimple *provider,
  [in, optional] ITextRangeProvider        *textRange
);

参数

[in] provider

类型: IRawElementProviderSimple*

在文本中发生位置更改的提供程序节点。

[in, optional] textRange

类型: ITextRangeProvider*

发生的文本范围更改(如果适用)。

返回值

类型: HRESULT

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

要求

要求
最低受支持的客户端 Windows 8.1 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows Server 2012 R2 [桌面应用 |UWP 应用]
目标平台 Windows
标头 uiautomationcoreapi.h
Library Uiautomationcore.lib
DLL Uiautomationcore.dll

另请参阅

IUIAutomation6::AddActiveTextPositionChangedEventHandlerIUIAutomation6::RemoveActiveTextPositionChangedEventHandlerIUIAutomationEventHandlerGroup::AddActiveTextPositionChangedEventHandler