ITfRange::Collapse method (msctf.h)
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
[in] ec
Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
[in] aPos
TfAnchor enumeration that describes how to collapse the range.
Value | Meaning |
---|---|
|
The end anchor is moved to the location of the start anchor. |
|
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
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 |