EM_LINEINDEX

An application sends an EM_LINEINDEX message to retrieve the character index of a line in a multiline edit control. The character index is the number of characters from the beginning of the edit control to the specified line.

EM_LINEINDEX 
wParam = (WPARAM) line; // line number 
lParam = 0;             // not used; must be zero 
 

Parameters

line
Value of wParam. Specifies the zero-based line number. A value of –1 specifies the current line number (the line that contains the caret).

Return Values

The return value is the character index of the line specified in the line parameter, or it is –1 if the specified line number is greater than the number of lines in the edit control.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.

See Also

Edit Controls Overview, Edit Control Messages, EM_LINEFROMCHAR