Jump to content

MLM_SETTEXTLIMIT

From EDM2
Revision as of 03:10, 28 April 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:MLM_SETTEXTLIMIT}} This message sets the maximum number of bytes that a multi-line entry field control can contain. ==Syntax== <pre> param1 LONG lSize; Maximum number of characters in MLFIE_NOTRANS format.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;lSize (LONG) - input: Maximum number of characters in MLFIE_NOTRANS format. ;ulReserved (ULONG) - input: Reserved value, should be 0. ==Returns== ;u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message sets the maximum number of bytes that a multi-line entry field control can contain.

Syntax

param1
LONG lSize;      /* Maximum number of characters in MLFIE_NOTRANS format. */

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

Parameters

lSize (LONG) - input
Maximum number of characters in MLFIE_NOTRANS format.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

ulFit (ULONG) - return
Success indicator.
0: Successful completion. Current text fits within the new limit.
Other: The number of bytes by which the current text exceeds the proposed limit.
The limit is not changed.

Remarks

The multi-line entry field control window procedure responds to this message by limiting the text size to lSize bytes. Text size is calculated using the MLFIE_NOTRANS format. Note that this is bytes and not characters; DBCS programmers should calculate accordingly.

This message returns 0 if the text limit exceeds or is equal to the existing text. Otherwise, it returns the number of bytes by which the text would have overflowed, and does not change the limit.

The default, which is unbounded, can be specified by entering a non-positive limit.

Default Processing

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