msgs12.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EM_SETSEL (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINENTRYFIELDS
 
EM_SETSEL
mp1 = MPFROM2SHORT((USHORT) usFirst, (USHORT) usLast);    /* range */
mp2 = 0L;                                /* not used, must be zero */
 
An application sends an EM_SETSEL message to set the range of a selection in
an entry field. If the first character position is zero and the last
character position is greater than or equal to the number of characters in
the entry field, the entire text is selected.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
usFirst    Low word of mp1. Specifies the offset to the first position of
           the selection.
 
usLast     High word of mp1. Specifies the offset to the last position of
           the selection.
 
Return Value
 
The return value is TRUE if the operation is successful or FALSE if an error
occurs.
 
See Also
 
EM_QUERYSEL, WM_QUERYDLGCODE