SetSel
Sets the selection in this RichEdit control.
void SetSel( long nStartChar, long nEndChar )
void
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_RICHEDIT1 1001 void RichEdit_SetSel(Dialog& EditBoxes) { RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1); // Select the character between 0 and 10 richEdit.SetSel(0, 10); long nStartChar, nEndChar; richEdit.GetSel(nStartChar, nEndChar); ASSERT(0 == nStartChar && 10 == nEndChar); }
RichEdit::GetSel
Control.h