Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfRange::ShiftStart method

Syntax


HRESULT ShiftStart(
  [in]        TfEditCookie ec,
  [in]        LONG         cchReq,
  [out]       LONG         *pcch,
  [in]  const TF_HALTCOND  *pHalt
);

Parameters

ec [in]

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

cchReq [in]

Contains the number of characters the start anchor is shifted. A negative value causes the anchor to move backward and a positive value causes the anchor to move forward.

pcch [out]

Pointer to a LONG value that receives the number of characters the anchor was shifted.

pHalt [in]

Pointer to a TF_HALTCOND structure that contains conditions about the shift. This parameter is optional and can be NULL.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_INVALIDARG

One or more parameters are 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.

This method cannot move an anchor beyond a region boundary. If the shift reaches a region boundary, the number of characters actually shifted will be less than requested. ITfRange::ShiftStartRegion is used to shift the anchor to an adjacent region.

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.

ITfRange::ShiftStart can be a lengthy operation. For better performance, use ITfRange::ShiftStartToRange 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

ITfRange
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
ITfRange::ShiftEnd
ITfRange::ShiftStartRegion
ITfRange::ShiftStartToRange
TF_HALTCOND

 

 

Community Additions

Show:
© 2016 Microsoft