ITfRange::ShiftStartRegion method (msctf.h)

Moves the start anchor into an adjacent region.

Syntax

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

Parameters

[in] ec

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

[in] dir

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

[out] pfNoRegion

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.

Value Description
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

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

ITfDocumentMgr::CreateContext

ITfEditSession::DoEditSession

ITfRange

ITfRange::ShiftEndRegion

ITfRange::ShiftStart

TfShiftDir