MLM_SETTEXTLIMIT
Appearance
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.