LineFromChar
Get line number from character index
long LineFromChar( long nIndex = -1 )const
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.
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_RICHEDIT1 1001 void RichEdit_LineFromChar(Dialog& EditBoxes) { RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1); // The index of the char to get information on. int nIndex = 10; long nLine = richEdit.LineFromChar(nIndex); }
Control.h