ITfContextComposition::FindComposition method (msctf.h)

Creates an enumerator object that contains all compositions that intersect a specified range of text.

Syntax

HRESULT FindComposition(
  [in]  TfEditCookie            ecRead,
  [in]  ITfRange                *pTestRange,
  [out] IEnumITfCompositionView **ppEnum
);

Parameters

[in] ecRead

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

[in] pTestRange

Pointer to an ITfRange object that specifies the range to search. This parameter can be NULL. If this parameter is NULL, the enumerator will contain all compositions in the edit context.

[out] ppEnum

Pointer to an IEnumITfCompositionView interface pointer that receives the enumerator object.

Return value

Value Description
S_OK
The method was successful.
E_FAIL
The enumerator object cannot be initialized.
E_INVALIDARG
One or more parameters are invalid.
E_OUTOFMEMORY
The enumerator object cannot be created.
TF_E_DISCONNECTED
The context object is not on a document stack.
 

The edit context identified by ecRead does not have a read-only lock.

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

IEnumITfCompositionView interface, ITfContextComposition interface, ITfRange interface, ITfEditSession::DoEditSession,