Help Center

CTextRange2.SetActiveSubrangemethod

Makes the specified subrange the active subrange of this range.

Windowsmethoddocumented

Syntax

FUNCTION SetActiveSubrange (BYVAL cpAnchor AS LONG, BYVAL cpActive AS LONG) AS HRESULT

Parameters

NameDescription
cpAnchorThe anchor end character position of the subrange to make active.
cpActiveThe active end character position of the subrange to make active.

Return value

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

Description

Makes the specified subrange the active subrange of this range.

Remarks

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

Reference

  • Defined in AfxNova/CTextRange2.inc:1064
  • Documented in Windows/WIndows Controls/RichEdit/CTextRange2 Class.md
  • Topic: CTextRange2 Class