Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Registers a method that handles Microsoft UI Automation events.
Syntax
HRESULT AddAutomationEventHandler(
[in] EVENTID eventId,
[in] TreeScope scope,
[in] IUIAutomationCacheRequest *cacheRequest,
[in] IUIAutomationEventHandler *handler
);
Parameters
[in] eventId
The identifier of the event that the method handles. For a list of event IDs, see Event Identifiers.
[in] scope
The scope of events to be handled; that is, whether they are on the element itself, or on its ancestors and descendants.
[in] cacheRequest
A pointer to a cache request, or NULL if no caching is wanted.
[in] handler
A pointer to the object that handles the event.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1809 [desktop apps only] |
Minimum supported server | Windows Server, version 1709 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationclient.h (include UIAutomation.h) |