msgs12.hlp (Topic list)
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_QUERYFORMATLINELENGTH (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMLE
 
MLM_QUERYFORMATLINELENGTH
mp1 = MPFROMLONG((LONG) lOffset); /* offset of beginning character */
mp2 = 0L;                         /* not used, must be zero        */
 
An application sends an MLM_QUERYFORMATLINELENGTH message to retrieve the
length (in bytes) of a line in a multiple-line entry field (MLE).
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
lOffset    Low and high word of mp1. Specifies the offset (number of
           characters from the beginning of the text) of the first character
           to count. If this value is -1, the current cursor position is
           used as the starting character.
 
Return Value
 
The return value is a 32-bit value (ULONG) that specifies the number of
bytes between the specified character and the beginning of the next line. If
the specified character is on the last line in the MLE, the number of bytes
to the end of that line is returned.
 
Comments
 
The number of bytes returned for the end-of-line character is determined by
the format specified by the MLM_FORMAT message. This format can be one of
the following values:
 
Format         Description
────────────────────────────────────────────────────────────────────────────
MLFIE_CFTEXT   The end-of-line character is formatted as
               carriage-return/linefeed characters (2 bytes).
 
MLFIE_NOTRANS  The end-of-line character is formatted as a linefeed
               character (1 byte).
 
MLFIE_WINFMT   The end-of-line character for hard line breaks is formatted
               as carriage-return/linefeed characters (2 bytes). The
               end-of-line character for soft line breaks (line breaks
               caused by word-wrapping) is formatted as
               carriage-return/carriage-return/linefeed characters (3
               bytes).
 
See Also
 
MLM_FORMAT, MLM_QUERYFORMATTEXTLENGTH, MLM_QUERYLINELENGTH
 
                                      ♦