Help Center

CTextRange2.AddSubrangemethod

Adds a subrange to this range.

Windowsmethoddocumented

Syntax

FUNCTION AddSubrange (BYVAL cp1 AS LONG, BYVAL cp2 AS LONG, BYVAL Activate AS LONG) AS HRESULT

Parameters

NameDescription
cp1The active-end character position of the subrange.
cp2The anchor-end character position of the subrange.
ActivateThe activate parameter. If this parameter is tomTrue, the new subrange is the active subrange, with cp1 as the active end, and cp2 the anchor end.

Description

Adds a subrange to this range.

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

Reference

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