我想实现在Cedit控件中换行的效果并存储 读出的数据也能换行
在保存事件中
CString str;
m_edit.GetWindowText(str);
str.Replace(_T("\r\n"),_T("||"));
...写入INI文件在导入事件中
CString str;
...取INI的字符串到str中
str.Replace(_T("||"),_T("\r\n"));
m_edit.SetWindowText(str);
可是照这样说的写了
能写入文件中
可是调用的时候
CString str;
str=m_strOldRecord;
str.Replace(_T("*|"),_T("\r\n"));
m_strOldRecord=str; str的值一点不动………………
请问这是什么原因呀
在保存事件中
CString str;
m_edit.GetWindowText(str);
str.Replace(_T("\r\n"),_T("||"));
...写入INI文件在导入事件中
CString str;
...取INI的字符串到str中
str.Replace(_T("||"),_T("\r\n"));
m_edit.SetWindowText(str);
可是照这样说的写了
能写入文件中
可是调用的时候
CString str;
str=m_strOldRecord;
str.Replace(_T("*|"),_T("\r\n"));
m_strOldRecord=str; str的值一点不动………………
请问这是什么原因呀
你可以用CStdioFile::Readstring一行一行读取
editbox的属性设置为多行的
str.Replace(_T("||"),_T("\r\n"));
m_strOldRecord=str;
UpdateData(FALSE);
特别是jdzwq(一技之痒) laiyiling(【陌生人 V2.0】) 这么关心我的帖子
555真感动!!!!!
这是我学VC半个月来的第一个作品
很简单的
有很多地方我知道这样不好,就是没有办法改进
我会继续努力的 谢谢大家的支持^-^以后我还会发问题的
请多多关照 :)