【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.27.27 RichEdit::SetSel
Contents
Description
Sets the selection in this RichEdit control.
Syntax
void SetSel( long nStartChar, long nEndChar )
Parameters
- nStartChar
- Zero-based index of the first character
- in the current selection.
- nEndChar
- Zero-based index of the last character
- in the current selection.
Return
void
Examples
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); }
Remark
See Also
Header to Include
Control.h