Share via


CEdit::SetSel

voidSetSel(DWORDdwSelection**,BOOLbNoScroll=FALSE);**

voidSetSel(intnStartChar**,intnEndChar,BOOLbNoScroll=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 in the Win32 documentation.

Example

See the example for CEdit::GetSel.

CEdit OverviewClass MembersHierarchy Chart

See Also   CEdit::GetSel, CEdit::ReplaceSel