Jump to content

EM SETTEXTLIMIT

From EDM2

This message sets the maximum number of bytes that an entry field control can contain.

Syntax

param1
    SHORT sTextLimit; /* Maximum number of characters in the entry field control. */

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

Parameters

sTextLimit (SHORT) - input
Maximum number of characters in the entry field control.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred. For example, because not enough storage can be allocated.

Remarks

The entry field control window procedure responds to this message by setting the maximum number of characters that can be contained. This message is intended only to limit the length of lines that result from the user interacting with the entry field control. It also limits the length of text that can result from sending a EM_PASTE or WM_SETWINDOWPARAMS message.

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.