CEdit::GetLineCount
Çok satırlı düzenleme denetimine satır sayısını almak için bu işlevini çağırın.
int GetLineCount( ) const;
Dönüş Değeri
Düzenleme denetimi birden çok satır satır sayısını içeren bir tamsayı.Düzenleme denetimine metin girilmemişse, dönüş değeri 1'dir.
Notlar
GetLineCountyalnızca birden çok satırlı düzenleme denetimleri tarafından işlenir.
Daha fazla bilgi için bkz: EM_GETLINECOUNT , Windows SDK.
Örnek
int i, nLineCount = m_myEdit.GetLineCount();
CString strText, strLine;
// Dump every line of text of the edit control.
for (i=0; i < nLineCount; i++)
{
// length of line i:
int len = m_myEdit.LineLength(m_myEdit.LineIndex(i));
m_myEdit.GetLine(i, strText.GetBuffer(len), len);
strText.ReleaseBuffer(len);
strLine.Format(_T("line %d: '%s'\n"), i, strText);
AFXDUMP(strLine);
}
Gereksinimler
Başlık: afxwin.h