RichEdit::GetLineCount

Contents

Description

Retrieves the number of lines in this RichEdit control.

Syntax

int GetLineCount( )const

Parameters

Return

The number of lines in this richedit control.

Remarks

Call this function to retrieve the number of lines in the RichEdit control.

Examples

EX1

#include <..\OriginLab\DialogEx.h>
#define IDC_RICHEDIT1 1001

void RichEdit_GetLineCount(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);
        }
}

Remark

See Also

header to Include

Control.h