CRichEditCtrl::GetLineCount
int GetLineCount( ) const;
Return Value
The number of lines in this CRichEditCtrl object.
Remarks
Call this function to retrieve the number of lines in the CRichEditCtrl object.
For more information, see in the Win32 documentation.
Example
#ifdef _DEBUG
// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;
int i, nLineLength, nLineCount = pmyRichEditCtrl->GetLineCount();
CString strText, strLine;
// Dump every line of text of the rich edit control.
for (i=0;i < nLineCount;i++)
{
nLineLength = pmyRichEditCtrl->LineLength(i);
pmyRichEditCtrl->GetLine(i, strText.GetBuffer(nLineLength));
strText.ReleaseBuffer(nLineLength);
strLine.Format(TEXT("line %d: '%s'\r\n"), i, strText.GetBuffer(0));
afxDump << strLine;
}
#endif
CRichEditCtrl Overview | Class Members | Hierarchy Chart
See Also CRichEditCtrl::GetLine