Jump to content

EM SETSEL

From EDM2
Revision as of 23:40, 14 April 2025 by Martini (talk | contribs) (Created page with "This message sets the zero-based offsets of the bounds of the text that forms the current selection. ==Syntax== <pre> param1 USHORT usminsel; Offset of the first character in the selection.: USHORT usmaxsel; Offset of the first character after the selection.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;''usminsel'' (USHORT) - input: Offset of the first character in the selection. ;''usmaxsel'' (USHORT) - in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message sets the zero-based offsets of the bounds of the text that forms the current selection.

Syntax

param1
    USHORT usminsel; /* Offset of the first character in the selection. */
    USHORT usmaxsel; /* Offset of the first character after the selection. */

param2
    ULONG  ulReserved; /* Reserved value, should be 0. */

Parameters

usminsel (USHORT) - input
Offset of the first character in the selection.
usmaxsel (USHORT) - input
Offset of the first character after the selection.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred

Remarks

The entry field control window procedure responds to this message by setting the zero-based offsets of the bounds of the text that forms the current selection. If usminsel equals usmaxsel, the current selection becomes an insertion point. If usminsel equals 0 and usmaxsel is equal to or greater than the text limit set by the EM_SETTEXTLIMIT message, the entire text is selected. Selected text is displayed in reverse color.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set rc to the default value of FALSE.