void SetSel( DWORD dwSelection, BOOL bNoScroll = FALSE );
void SetSel( int nStartChar, int nEndChar, BOOL bNoScroll = FALSE );
Parameters
dwSelection
Specifies the starting position in the low-order word and the ending position in the high-order word. If the low-order word is 0 and the high-order word is –1, all the text in the edit control is selected. If the low-order word is –1, any current selection is removed.
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.
nStartChar
Specifies the starting position. If nStartChar is 0 and nEndChar is –1, all the text in the edit control is selected. If nStartChar is –1, any current selection is removed.
nEndChar
Specifies the ending position.
Remarks
Call this function to select a range of characters in an edit control.
For more information, see EM_SETSEL in the Win32 documentation.
CEdit Overview | Class Members | Hierarchy Chart
See Also CEdit::GetSel, CEdit::ReplaceSel