ITfRange::ShiftStartToRange method (msctf.h)
Moves the start anchor of this range to an anchor within another range.
Syntax
HRESULT ShiftStartToRange(
[in] TfEditCookie ec,
[in] ITfRange *pRange,
[in] TfAnchor aPos
);
Parameters
[in] ec
Contains an edit cookie that identifies the edit context obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
[in] pRange
Pointer to an ITfRange interface that contains the anchor that the start anchor is moved to.
[in] aPos
Contains one of the TfAnchor values that specifies which anchor of pRange the start anchor is moved to.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
pRange is invalid. |
|
An unspecified error occurred. |
|
The edit context identified by ec does not have a read-only lock. |
Remarks
The start and end positions of a range are called anchors.
If the shift operation causes the range start anchor to move past the end anchor, the end anchor is moved to the same location as the start anchor.
This method is more efficient than ITfRange::ShiftStart and should be used when possible.
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
ITfRange::ShiftStart