◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── #define INCL_WINMLE MLM_QUERYFORMATTEXTLENGTH mp1 = MPFROMLONG((LONG) lOffset); /* offset of starting character */ mp2 = MPFROMLONG((LONG) cbChar); /* characters to scan */ An application sends an MLM_QUERYFORMATTEXTLENGTH message to retrieve the length (in bytes) of a range of characters in 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 parameter is set to -1, the current cursor position is used as the starting character. cbChar Low and high word of mp2. Specifies the number of characters to scan. If this parameter is set to -1, the entire text is scanned. Return Value The return value is a 32-bit value (ULONG) that specifies the number of bytes in the specified range of characters. Comments The number of bytes returned for any end-of-line characters 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 ♦