Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Creates a new composition.
HRESULT StartComposition(
[in] TfEditCookie ecWrite,
[in] ITfRange *pCompositionRange,
[in] ITfCompositionSink *pSink,
[out] ITfComposition **ppComposition
);
[in] ecWrite
Contains an edit cookie that identifies the edit context. This is obtained from ITfEditSession::DoEditSession.
[in] pCompositionRange
Pointer to an ITfRange object that specifies the text that the composition initially covers.
[in] pSink
Pointer to an ITfCompositionSink object that receives composition event notifications. This parameter is optional and can be NULL. If supplied, the object is released when the composition is terminated.
[out] ppComposition
Pointer to an ITfComposition interface pointer that receives the new composition object. This parameter receives NULL if the context owner rejects the composition.
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. If the context owner composition advise sink rejects the composition, ppComposition is set to NULL. |
|
An unspecified error occurred. |
|
One or more parameters are invalid. |
|
The composition object cannot be created. |
|
The method was called within another composition operation. |
|
The context object is not on a document stack. |
|
The edit context identified by ecWrite does not have a read/write lock. |
If the context owner has installed a context owner composition advise sink, the ITfContextOwnerCompositionSink::OnStartComposition method is called. If the advise sink rejects the new composition, this method returns S_OK but ppComposition is set to NULL.
Any text covered by pCompositionRange receives the GUID_PROP_COMPOSING property.
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 |
IEnumITfCompositionView interface, ITfContextComposition interface, ITfRange interface, ITfCompositionSink interface, ITfContextOwnerCompositionSink::OnStartComposition, ITfEditSession::DoEditSession
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today