Partager via


EM_SETSEL

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This message selects a range of characters in an edit control.

Syntax

EM_SETSEL 
    wParam = (WPARAM)(INT) nStart; 
    lParam = (LPARAM)(INT) nEnd;

Parameters

  • nStart
    Specifies the starting character position of the selection.
  • nEnd
    Specifies the ending character position of the selection.

Return Value

None.

Remarks

If the nStart parameter is 0 and the nEnd parameter is –1, all the text in the edit control is selected. If nStart is –1, any current selection is removed. The caret is placed at the end of the selection indicated by the greater of the two values nEnd and nStart.

Requirements

Header windows.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

EM_GETSEL
EM_REPLACESEL
EM_SCROLLCARET
Edit Boxes Messages