IUIAutomationTextEditTextChangedEventHandler::HandleTextEditTextChangedEvent method

Handles an event that is raised when a Microsoft UI Automation provider for a text-edit control reports a programmatic text change.

Syntax


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

Parameters

sender [in]

Type: IUIAutomationElement*

A pointer to the element that raised the event.

textEditChangeType [in]

Type: TextEditChangeType

The type of text-edit change that occurred.

eventStrings [in]

Type: SAFEARRAY*

Event data passed by the event.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is implemented by the application to handle events that it has subscribed to by using AddTextEditTextChangedEventHandler.

The event data contains different payloads for each text-edit change type:

  • TextEditChangeType_AutoCorrect: Data is the new corrected string .
  • TextEditChangeType_Composition: Data is the updated string in the composition (only the part that changed).
  • TextEditChangeType_CompositionFinalized: Data is the finalized string of the completed composition (this may be empty if composition was canceled or deleted).

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

Windows Server 2012 R2 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

IUIAutomationTextEditTextChangedEventHandler
Best Practices for Using Safe Arrays

 

 

Show: