Help Center

CRichEditCtx.ExSetSelmethod

Selects a range of characters and/or Component Object Model (COM) objects in a Microsoft Rich Edit control.

Windowsmethoddocumented

Syntax

FUNCTION ExSetSel OVERLOAD (BYREF cr AS CHARRANGE) AS DWORD
SUB ExSetSel OVERLOAD (BYVAL cpMin AS LONG = 0, BYVAL cpMax AS LONG = -1)

Parameters

NameDescription
crA CHARRANGE structure that specifies the selection range.
cpMinCharacter position index immediately preceding the first character in the range.
cpMaxCharacter position immediately following the last character in the range.

Return value

The return value is the selection that is actually set.

Description

Overloaded method that selects a range of characters and/or Component Object Model (COM) objects in a Microsoft Rich Edit control.

Examples

type _charrange field = 4 pMin as LONG cpMax as LONG end type

type CHARRANGE as _charrange

DIM chrRange AS CHARRANGE = TYPE<CHARRANGE>(3, 12) pRichEditCtro.ExSetSel(@chrRange)

Reference

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