共用方式為


UiaRaiseActiveTextPositionChangedEvent 函式 (uiautomationcoreapi.h)

由提供者呼叫,通知 Microsoft 使用者介面自動化 核心文字控件內的位置已以程式設計方式變更。

語法

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
程式庫 Uiautomationcore.lib
Dll Uiautomationcore.dll

另請參閱

IUIAutomation6::AddActiveTextPositionChangedEventHandlerIUIAutomation6::RemoveActiveTextPositionChangedEventHandlerIUIAutomationEventHandlerGroup::AddActiveTextPositionChangedEventHandler