ITfRange::ShiftStartRegion method

Syntax


HRESULT ShiftStartRegion(
  [in]  TfEditCookie ec,
  [in]  TfShiftDir   dir,
  [out] BOOL         *pfNoRegion
);

Parameters

ec [in]

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

dir [in]

Contains one of the TfShiftDir values that specifies which adjacent region the start anchor is moved to.

pfNoRegion [out]

Pointer to a BOOL that receives a flag that indicates if the anchor is positioned adjacent to another region. Receives a nonzero value if the anchor is not adjacent to another region or zero otherwise.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_INVALIDARG

pfNoRegion is invalid.

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.

The anchor must be positioned adjacent to the desired region prior to calling this method. If it is not, then pfNoRegion receives a nonzero value and the anchor is not moved. If the anchor is adjacent to the desired region, pfNoRegion receives zero and the anchor is moved to the region.

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::ShiftEndRegion
ITfRange::ShiftStart
TfShiftDir

 

 

Show: