IAnchor::ShiftRegion method (textstor.h)

Shifts the anchor into an adjacent region in the text stream.

Syntax

HRESULT ShiftRegion(
  [in]  DWORD      dwFlags,
  [in]  TsShiftDir dir,
  [out] BOOL       *pfNoRegion
);

Parameters

[in] dwFlags

Bitfields that are used to control anchor repositioning around hidden text, or to avoid actual repositioning of the anchor.

Value Meaning
TS_SHIFT_COUNT_HIDDEN
Specifies that the anchor will be shifted to the next region boundary, including the boundary of a hidden text region. If not set, the anchor will be shifted past any adjacent hidden text until a region of visible text is found.
TS_SHIFT_COUNT_ONLY
The anchor is not shifted.

[in] dir

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

Value Meaning
TS_SD_BACKWARD
Specifies that the anchor will be moved to the region immediately preceding a range of text.
TS_SD_FORWARD
Specifies that the anchor will be moved to the region immediately following a range of text.

[out] pfNoRegion

Boolean value that specifies whether a shift of the anchor occurred.

Value Meaning
TRUE
The shift failed, and the anchor was not repositioned.
FALSE
The shift succeeded.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_FAIL
The shift failed.
E_INVALIDARG
An input parameter value is invalid.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header textstor.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

IAnchor

IAnchor::Shift

TS_SHIFT_* Constants

TsShiftDir