◄CEdit► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── int LineFromChar( int nIndex = -1 ) const; Parameter Description <nIndex> Contains the zero-based index value for the desired character in the text of the edit control, or contains -1. If <nIndex> is -1, it specifies the current line, i.e., the line that contains the caret. Remarks Retrieves the line number of the line that contains the specified character index. A character index is the number of characters from the beginning of the edit control. This member function is only used by multiple-line edit controls. Return Value The zero-based line number of the line containing the character index specified by <nIndex>. If <nIndex> is -1, the number of the line that contains the first character of the selection is returned. If there is no selection, the current line number is returned. See Also ◄CEdit::LineIndex►, ◄EM_LINEFROMCHAR► -♦-