workaholic
2007-01-05 11:15:12 UTC
I want my text written in CRichEditCtrl to output as plain text, and I
did this:
//in View:
void CLEView::OnFormatConvert()
{
CRichEditCtrl *pCtrl = &this->GetRichEditCtrl();
pCtrl->SetSel(0,-1);
this->GetDocument()->m_text = pCtrl->GetSelText();
}
//in Document:
void CLispEditorDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar<<m_text;// TODO: add storing code here
}
else
{
ar>>m_text;// TODO: add loading code here
}
}
But it turns out to be a complex text with lengthy ugly characters and
the useful part only exists in the rear of the file, why?
Thanks in advance!
did this:
//in View:
void CLEView::OnFormatConvert()
{
CRichEditCtrl *pCtrl = &this->GetRichEditCtrl();
pCtrl->SetSel(0,-1);
this->GetDocument()->m_text = pCtrl->GetSelText();
}
//in Document:
void CLispEditorDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar<<m_text;// TODO: add storing code here
}
else
{
ar>>m_text;// TODO: add loading code here
}
}
But it turns out to be a complex text with lengthy ugly characters and
the useful part only exists in the rear of the file, why?
Thanks in advance!