UiaRaiseTextEditTextChangedEvent function
Called by a provider to notify the Microsoft UI Automation core that a text control has programmatically changed text.
Syntax
HRESULT WINAPI UiaRaiseTextEditTextChangedEvent( _In_ IRawElementProviderSimple *pProvider, _In_ TextEditChangeType textEditChangeType, _In_ SAFEARRAY *pChangedData );
Parameters
- pProvider [in]
-
Type: IRawElementProviderSimple*
The provider node where the text change occurred.
- textEditChangeType [in]
-
Type: TextEditChangeType
The type of text-edit change that occurred.
- pChangedData [in]
-
Type: SAFEARRAY*
The event data. Should be assignable as a VAR of type VT_BSTR.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This is a helper function for providers that implement ITextEditProvider and are raising the pattern's required events. Follow the guidance given in TextEdit Control Pattern that describes when to raise the events and what payload the events should pass to UI Automation.
If there are no clients listening for a particular change type, no event is raised.
The event data should contain different payloads for each change type (per TextEditChangeType):
- TextEditChangeType_AutoCorrect: pChangedData should be the new corrected string .
- TextEditChangeType_Composition: pChangedData should be the updated string in the composition (only the part that changed).
- TextEditChangeType_CompositionFinalized: pChangedData should be 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 | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- TextEdit Control Pattern
- ITextEditProvider
- HandleTextEditTextChangedEvent
- IUIAutomation3::AddTextEditTextChangedEventHandler