IUIAutomation5::AddNotificationEventHandler メソッド (uiautomationclient.h)

通知イベントを処理するメソッドを登録します。

メモ イベント ハンドラーを実装する前に、「スレッドの問題について」で説明されているスレッドの問題 について理解しておく必要があります。
 

構文

HRESULT AddNotificationEventHandler(
  [in] IUIAutomationElement                  *element,
       TreeScope                             scope,
  [in] IUIAutomationCacheRequest             *cacheRequest,
  [in] IUIAutomationNotificationEventHandler *handler
);

パラメーター

[in] element

種類: IUIAutomationElement*

イベント ハンドラーに関連付けられているUI オートメーション要素へのポインター。

scope

[in] cacheRequest

種類: IUIAutomationCacheRequest*

キャッシュ要求へのポインター。キャッシュが必要ない場合は NULL

[in] handler

種類: IUIAutomationNotificationEventHandler*

通知イベントを処理する オブジェクトへのポインター。

戻り値

型: HRESULT

このメソッドは、成功すると S_OK を返します。 そうでない場合は、HRESULT エラー コードを返します。

要件

要件
サポートされている最小のクライアント Windows 10バージョン 1709 [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows Server バージョン 1709 [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー uiautomationclient.h (UIAutomation.h を含む)

こちらもご覧ください

IUIAutomation5

RemoveAllEventHandlers