IUIAutomationTextEditTextChangedEventHandler::HandleTextEditTextChangedEvent 方法 (uiautomationclient.h)

處理當 Microsoft 使用者介面自動化 控件的文字編輯控件提供者報告程式設計文字變更時所引發的事件。

語法

HRESULT HandleTextEditTextChangedEvent(
  [in] IUIAutomationElement *sender,
  [in] TextEditChangeType   textEditChangeType,
  [in] SAFEARRAY            *eventStrings
);

參數

[in] sender

類型: IUIAutomationElement*

引發事件之專案的指標。

[in] textEditChangeType

類型: TextEditChangeType

所發生的文字編輯變更類型。

[in] eventStrings

類型: SAFEARRAY*

事件所傳遞的事件數據。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

備註

這個方法是由應用程式實作,以處理已使用 AddTextEditTextChangedEventHandler 訂閱的事件。

事件資料包含每個文字編輯變更類型的不同承載:

  • TextEditChangeType_AutoCorrect:數據是新的更正字串。
  • TextEditChangeType_Composition:數據是組合中更新的字串, (變更) 的部分。
  • TextEditChangeType_CompositionFinalized:數據是已完成組合的完成字串, (如果取消或刪除組合) ,這可能是空的。

規格需求

需求
最低支援的用戶端 Windows 8.1 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2012 R2 [僅限傳統型應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

使用安全數位的最佳做法

IUIAutomationTextEditTextChangedEventHandler