GetLine
Get the line of text at specified line index
string GetLine( int nIndex = -1 )const
the text at given line or an empty string is line specified is not a valid line number
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_RICHEDIT1 1001 void RichEdit_GetLine(Dialog& EditBoxes) { RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1); int ii, nLineLength; int nLineCount = richEdit.GetLineCount(); string strText; for (ii = 0; ii < nLineCount; ii++) { nLineLength = richEdit.LineLength(ii); strText = richEdit.GetLine(ii); } }
The implementation of this function is different from the MFC version. The MFC version is more difficult to use.
Control.h