ITfContext::SetSelection method
Syntax
HRESULT SetSelection( [in] TfEditCookie ec, [in] ULONG ulCount, [in] const TF_SELECTION *pSelection );
Parameters
- ec [in]
-
Contains an edit cookie that identifies the edit session. This is the value passed to ITfEditSession::DoEditSession.
- ulCount [in]
-
Specifies the number of selections in the pSelection array.
- pSelection [in]
-
An array of TF_SELECTION structures that contain the information for each selection.
Return value
This method can return one of these values.
| Value | Description |
|---|---|
|
The method was successful. |
|
The document has no selection. |
|
The cookie in ec is invalid. |
Remarks
A selection is a span of highlighted text, or an insertion point if the span is empty, identifying the user focus area within a document. Some documents are capable of having multiple selections. There can only be one zero-length selection in pSelection as it represents the position of the document caret.
If an application must adjust the text covered by a selection, it should wait until the caller releases the lock. However, applications can adjust any of the style members of the TF_SELECTION structures while still returning S_OK.
The caller can set the fInterimChar flag only if one selection is set. In this case, the selection should span exactly one character and the ase member of the TF_SELECTION structure is set to TFAE_NONE.
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 |
|
|
IDL |
|
|
DLL |
|
See also