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_QUERYSEL (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINENTRYFIELDS
EM_QUERYSEL
mp1 = 0L; /* not used, must be zero */
mp2 = 0L; /* not used, must be zero */
An application sends an EM_QUERYSEL message to determine the offsets of the
current selection in an entry-field control.
This message does not use any parameters.
Return Value
The low word of the return value is the byte offset to the first character
of the selection. The high word of the return value is the byte offset of
the last character of the selection.
Comments
To determine the text for the current selection, an application would first
call the WinQueryWindowText function to get the entire contents, then send a
EM_QUERYSEL message to get the offsets to the first and last characters of
the selection within the text, and then use these offsets to retrieve the
selection text from the entire text.
See Also
WinQueryWindowText, EM_SETSEL
♦