【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.27.9 RichEdit::GetSel
Contents
Description
Gets the starting and ending positions of the current selection in this RichEdit control.
Syntax
void GetSel( 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_GetSel(Dialog& EditBoxes) { RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1); long nStartChar, nEndChar; richEdit.GetSel(nStartChar, nEndChar); string str; str.Format("Start:%d, End:%d\n", nStartChar, nEndChar); MessageBox(NULL, str, "Rich Edit Sample"); }
Remark
Call this function to retrieve the bounds of the current selection in this RichEdit control.
See Also
Header to Include
Control.h