2.2.6.13.9 Edit::SetSel

Description

Call this function to set the selection in the Edit control

Syntax

void SetSel( int nStartChar, int nEndChar, BOOL bNoScroll = FALSE )

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.
bNoScroll
Indicates whether the caret should be scrolled into view.
If FALSE, the caret is scrolled into view. If TRUE, the caret is not scrolled into view.

Return

void

Examples

EX1

#include <Origin.h>
#include <..\OriginLab\DialogEx.h>

#define IDC_EDIT1 1001
void Edit_SetSel(Dialog& MyDlg)
{
	Edit ed = MyDlg.GetItem(IDC_EDIT1);
	ed.SetSel(32000, 32000); // move to end of all text
}

Remark

See Also

Edit::GetSel

Header to Include

Control.h