ITfRange::Collapse method
The ITfRange::Collapse method clears the range of text by moving its start anchor and end anchor to the same position.
Syntax
HRESULT Collapse( [in] TfEditCookie ec, [in] TfAnchor aPos );
Parameters
- ec [in]
-
Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
- aPos [in]
-
TfAnchor enumeration that describes how to collapse the range.
Value Meaning - TF_ANCHOR_START
The end anchor is moved to the location of the start anchor.
- TF_ANCHOR_END
The start anchor is moved to the location of the end anchor.
Return value
This method can return one of these values.
| Value | Description |
|---|---|
|
The method was successful. |
|
The object does not support the interface, or a new range cannot be created. |
|
aPos is invalid. |
|
The cookie in ec is invalid, or the caller does not have a read-only lock. |
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