Jump to content

MLM_SETSEL

From EDM2

This message sets a selection.

Syntax

param1
IPT iptAnchor; /* Insertion point for new anchor point. */

param2
IPT iptCursor; /* Insertion point for new cursor point. */

Parameters

iptAnchor (IPT) - input
Insertion point for new anchor point.
iptCursor (IPT) - input
Insertion point for new cursor point.

Returns

rc (BOOL) - return
Success indicator.
TRUE: Selection successfully set.
FALSE: An error occurred.

Remarks

This message sets the anchor and cursor points. The screen display is updated appropriately, ensuring that the cursor point is visible (which may involve scrolling). Note that the text cursor and inversion are not displayed if the MLE window does not have the input focus. A negative value for a point leaves that point alone.

Default Processing

The default window procedure takes no action on this message, other than to set rc to FALSE.

Examples

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);