ITfRange::ShiftStartToRange method

Syntax


HRESULT ShiftStartToRange(
  [in]  TfEditCookie ec,
  [in]  ITfRange *pRange,
  [in]  TfAnchor aPos
);

Parameters

ec [in]

Contains an edit cookie that identifies the edit context obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

pRange [in]

Pointer to an ITfRange interface that contains the anchor that the start anchor is moved to.

aPos [in]

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.

ValueDescription
S_OK

The method was successful.

E_INVALIDARG

pRange is invalid.

E_FAIL

An unspecified error occurred.

TF_E_NOLOCK

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

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

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
ITfRange
ITfRange::ShiftEndToRange
ITfRange::ShiftStart
ITfRange::ShiftStart
TfAnchor

 

 

Community Additions

ADD
Show:
© 2014 Microsoft