Jump to content

MLM_SETWRAP

From EDM2
Revision as of 03:22, 28 April 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:MLM_SETWRAP}} This message sets the wrap flag. ==Syntax== <pre> param1 USHORT usWrap; New value for wrap flag.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;usWrap (USHORT) - input: New value for wrap flag. ;ulReserved (ULONG) - input: Reserved value, should be 0. ==Returns== ;rc (BOOL) - return: Success indicator. ::TRUE: Successful completion. ::FALSE: An error occurred. ==Remarks== The multi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message sets the wrap flag.

Syntax

param1
USHORT usWrap;    /* New value for wrap flag. */

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

Parameters

usWrap (USHORT) - input
New value for wrap flag.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

rc (BOOL) - return
Success indicator.
TRUE: Successful completion.
FALSE: An error occurred.

Remarks

The multi-line entry field control window procedure responds to this message by setting the word wrap mode and updating the screen as appropriate.

When word-wrap is turned on, the text is wrapped to fit the formatting rectangle width. When word-wrap is turned off, the text is allowed to trail off to the right until it reaches an end-of-line marker.

Word-wrapping is defined as follows: Words are sequences of non-white- space characters (white-space characters are space, line break, and tab). When word-wrapping is enabled, the whole word must appear on one line within the formatting rectangle, unless the word by itself is too long to fit. In this case, the word is split following the last character that fits, and the remainder starts a new line.

This definition then applies recursively to the remainder of the word. The word continues to be visible. For editing purposes (for example, for word- selection), the word is viewed as a single word drawn over multiple lines.

Blank characters are always accumulated onto the current line, even if they exceed the horizontal formatting dimension; that is, blanks are allowed to trail off the right-hand edge. Line-break characters are also allowed to exceed the horizontal dimension, and any subsequent text must begin on a new line. The line-break following a line-break character is sometimes referred to as a hard line-break. Other line breaks, due to word-wrapping and not to explicit formatting characters, are referred to as soft line-breaks.

Tab characters must always be visible. If a tab character occurs after the last tab stop within the horizontal formatting dimension, a soft line-break occurs after the tab.

This message can cause an overflow; see MLN_OVERFLOW.

Default Processing

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