ITextRange2::SetActiveSubrange method (tom.h)

Makes the specified subrange the active subrange of this range.

Syntax

HRESULT SetActiveSubrange(
  [in] long cpAnchor,
  [in] long cpActive
);

Parameters

[in] cpAnchor

Type: long

The anchor end character position of the subrange to make active.

[in] cpActive

Type: long

The active end character position of the subrange to make active.

Return value

Type: HRESULT

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

The active subrange is the one affected by operations such as Shift+Arrow keys if this range is the selection.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

ITextRange2