CRichEdit.ExSetSelmethod
Selects a range of characters and/or Component Object Model (COM) objects in a Microsoft Rich Edit control.
Syntax
FUNCTION ExSetSel (BYVAL hRichEdit AS HWND, BYVAL lpcr AS CHARRANGE PTR) AS DWORD
Parameters
| Name | Description | |
|---|---|---|
hRichEdit | The handle of the rich edit control. | |
lpcr | A pointer to a CHARRANGE structure that specifies the selection range. |
Return value
The return value is the selection that is actually set.
Description
Selects a range of characters or Component Object Model (COM) objects in a Microsoft Rich Edit control.
Examples
type _charrange field = 4 cpMin as LONG cpMax as LONG end type
type CHARRANGE as _charrange
DIM chrRange AS CHARRANGE = TYPE<CHARRANGE>(3, 12) ExSetSel(hRichEdit, @chrRange)
Reference
- Defined in AfxNova/CRichEdit.inc:316
- Documented in Windows/WIndows Controls/CRichEdit Class.md
- Topic: CRichEdit Class