Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfContextComposition::StartComposition method

Syntax


HRESULT StartComposition(
  [in]   TfEditCookie ecWrite,
  [in]   ITfRange *pCompositionRange,
  [in]   ITfCompositionSink *pSink,
  [out]  ITfComposition **ppComposition
);

Parameters

ecWrite [in]

Contains an edit cookie that identifies the edit context. This is obtained from ITfEditSession::DoEditSession.

pCompositionRange [in]

Pointer to an ITfRange object that specifies the text that the composition initially covers.

pSink [in]

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.

ppComposition [out]

Pointer to an ITfComposition interface pointer that receives the new composition object. This parameter receives NULL if the context owner rejects the composition.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful. If the context owner composition advise sink rejects the composition, ppComposition is set to NULL.

E_FAIL

An unspecified error occurred.

E_INVALIDARG

One or more parameters are invalid.

E_OUTOFMEMORY

The composition object cannot be created.

E_UNEXPECTED

The method was called within another composition operation.

TF_E_DISCONNECTED

The context object is not on a document stack.

TF_E_NOLOCK

The edit context identified by ecWrite does not have a read/write lock.

 

Remarks

If the context owner has installed an 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfContextComposition
ITfEditSession::DoEditSession
ITfRange
ITfCompositionSink
ITfComposition
ITfContextOwnerCompositionSink::OnStartComposition

 

 

Community Additions

Show:
© 2014 Microsoft