Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
MLM_SETFORMATRECT (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMLE
MLM_SETFORMATRECT
mp1 = MPFROMP((PMLEFORMATRECT) pmlefrmrcl); /* point to format rect. */
mp2 = MPFROMLONG((ULONG) flOptions); /* options */
An application sends an MLM_SETFORMATRECT message to set a format rectangle
in a multiple-line entry field (MLE). The format rectangle can be used to
limit the insertion of text within the MLE window.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pmlefrmrcl Low and high word of mp1. Points to the MLEFORMATRECT structure
that contains the format-rectangle dimensions. If this parameter
is NULL, the current MLE-window dimensions (minus the border or
scroll bars) is used.
flOptions Low and high word of mp2. Specifies how the format rectangle is
to be used. A value of zero causes the MLE to remove any format
rectangle and to ignore the pmlefrmrcl parameter. Otherwise,
this parameter can be a combination of the following values:
Value Meaning
────────────────────────────────────────────────────────────────
MLFFMTRECT_LIMITHORZ Specifies that the text within the MLE
cannot exceed the horizontal dimension
specified by the pmlefrmrcl parameter.
If word-wrap mode is turned on before
the format rectangle is set, lines
automatically wrap to stay within the
horizontal limit of the format
rectangle. If word-wrap mode is turned
off before the format rectangle is set,
an MLN_PIXHORZOVERFLOW notification
message is sent to the application
whenever an operation would exceed the
horizontal limit specified in the format
rectangle.
MLFFMTRECT_LIMITVERT Specifies that the text within the MLE
cannot exceed the vertical dimension
specified by the pmlefrmrcl parameter.
When an MLE operation would cause text
to exceed the vertical limit, an
MLN_PIXVERTOVERFLOW notification message
is sent to the application.
MLFFMTRECT_MATCHWINDOW Specifies that the format rectangle is
to be kept the same size as the MLE
window (minus the border or scroll
bars).
MLFFMTRECT_FORMATRECT Specifies that the format rectangle is
to be kept the same size as the MLE
window (minus the border or scroll bars)
and that text cannot exceed the size of
the window. This value is equivalent to
combining the MLFFMTRECT_LIMITHORZ,
MLFFMTRECT_LIMITVERT, and
MLFFMTRECT_MATCHWINDOW values.
Return Value
The return value is TRUE if the text fits within the new format-rectangle
dimensions. Otherwise, it is FALSE, indicating that the text does not fit
and that the format rectangle is not set.
Comments
Whenever an insertion would cause the text to be too long for the MLE, the
MLN_PIXVERTOVERFLOW or MLN_PIXHORZOVERFLOW notification message is sent.
See Also
MLM_QUERYFORMATRECT, MLN_PIXHORZOVERFLOW, MLN_PIXVERTOVERFLOW, WM_CONTROL,
MLEFORMATRECT
♦