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.
MLM_SETSEL (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMLE
MLM_SETSEL
mp1 = MPFROMLONG(lOffsetBegin); /* offset of beginning character */
mp2 = MPFROMLONG(lOffsetEnd); /* offset of ending character */
An application sends an MLM_SETSEL message to select an area of text within
a multiple-line entry field (MLE).
Parameter Description
────────────────────────────────────────────────────────────────────────────
lOffsetBegin Low and high word of mp1. Specifies the offset (number of
characters from the beginning of the text) of the first
character. If this parameter is set to -1, the current cursor
position is used.
lOffsetEnd Low and high word of mp2. Specifies the offset of the
character just beyond the selection, where the cursor is to be
placed. If this parameter is set to -1, the current cursor
position is used.
Return Value
The return value is always TRUE.
Comments
The MLE scrolls the text vertically and horizontally as needed to make the
selection visible.
If the lOffsetEnd parameter is greater than the lOffsetBegin parameter, the
cursor is placed to the right of the selected text. If lOffsetEnd is less
than lOffsetBegin, the cursor is placed to the left of the selected text.
Character offsets are zero-based. Therefore, the first character has an
offset of zero.
Example
This example highlights the second, third, and fourth characters of the
text, and places the cursor to the right of the fourth character.
WinSendMsg(hwndMle, MLM_SETSEL, (MPARAM) 1L, (MPARAM) 4L);
See Also
MLM_QUERYSEL
♦