Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get content line by line from CRichEditCtrl (jchen)

Status
Not open for further replies.

koeicjm

Programmer
Sep 12, 2001
73
JP
I want to get the content Line by line from a CRichEditCtrl variable, but something seems wrong. Using this code I can got successly from a CEdit , what is different from CEdit and CRichEditCtrl??

m_sNyme = "";
for ( iLine = 0;iLine < m_Edit_Nym.GetLineCount();iLine++){
iIndex = m_Edit_Nym.LineIndex(iLine);
iLineSize = m_Edit_Nym.LineLength(iIndex);
strText.Empty();
lp_cs = strText.GetBuffer( iLineSize );
iGetSize = m_Edit_Nym.GetLine(iLine ,lp_cs , iLineSize );
strText.ReleaseBuffer();
m_sNyme = m_sNyme + strText;
m_sNyme = m_sNyme + &quot;;&quot; ;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top