Help Center

CTextRange2.Expandmethod

Expands this range so that any partial units it contains are completely contained.

Windowsmethoddocumented

Syntax

FUNCTION Expand (BYVAL Unit AS LONG = tomWord) AS LONG

Parameters

NameDescription
UnitUnit to include, if it is partially within the range. The default value is tomWord.
For a list of Unit values, see the table below.

Return value

The count of characters added to the range. The value can be null.

Description

Expands this range so that any partial units it contains are completely contained.

Remarks

For example, if an insertion point is at the beginning, the end, or within a word, Expand expands the range to include that word. If the range already includes one word and part of another, Expand expands the range to include both words. Expand expands the range to include the visible portion of the range's story.

Reference

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