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 + ";" ;
}
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 + ";" ;
}