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.
Terminates a composition.
Syntax
HRESULT TerminateComposition(
[in] ITfCompositionView *pComposition
);
Parameters
[in] pComposition
Pointer to a ITfCompositionView interface that represents the composition to terminate. If this value is NULL, all compositions in the context are terminated.
Return value
This method can return one of these values.
| Value | Description |
|---|---|
|
The method was successful. |
|
The context is not on a document stack. |
|
A text service currently holds a lock on the document. |
|
This method was called during another composition operation. |
|
An unspecified error occurred. |
Remarks
A text service uses ITfComposition::EndComposition to terminate a composition that it created.
If the context owner implements the text store, the context owner must be able to grant a synchronous write lock before calling this method.
This method also does the following:
- For each composition terminated, ITfCompositionSink::OnCompositionTerminated is called for all installed composition advise sinks.
- If the context owner installed a context owner composition advise sink, ITfContextOwnerCompositionSink::OnEndComposition is called for each terminated composition.
- The GUID_PROP_COMPOSING property will be cleared for the text covered by each terminated composition.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
| Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
| Target Platform | Windows |
| Header | msctf.h |
| DLL | Msctf.dll |
| Redistributable | TSF 1.0 on Windows 2000 Professional |
See also
ITfComposition::EndComposition, nf-msctf-itfcompositionsink-oncompositionterminated, ITfCompositionView interface, ITfContextOwnerCompositionServices interface, ITfContextOwnerCompositionSink::OnEndComposition