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_CHARFROMLINE (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMLE
 
MLM_CHARFROMLINE
mp1 = MPFROMLONG((LINE) lLineNum);    /* line number            */
mp2 = 0L;                             /* not used, must be zero */
 
An application sends an MLM_CHARFROMLINE message to obtain the offset
(number of characters from the beginning of the text) of the first character
on the specified line in a multiple-line entry field (MLE).
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
lLineNum   Low and high word of mp1. Specifies the line number. A value of
           zero specifies the first line. A value of -1 specifies the line
           that contains the cursor.
 
Return Value
 
The return value is the 32-bit offset of the first character on the
specified line.
 
Comments
 
If the lLineNum parameter specifies a line number greater than the line
number of the last line of text in the MLE, the insertion point returned
will be the point to the right of the last character in the MLE.
 
A line consists of all text up to a carriage return. A line may be displayed
as several lines on the screen due to word-wrapping and still be considered
a single line when specifying the line number for the lLineNum parameter.
 
Line numbers are zero-based. Therefore, the first line in an MLE is zero.
 
See Also
 
MLM_LINEFROMCHAR