概述
void CMFCApplication3Dlg::OnSave()
{ //保存文本
CFile file;
if (!file.Open(L"C:\Users\Administrator\Desktop\1.txt", CFile::modeReadWrite))
{
MessageBox(L"文件不存在");
return;
}
char s[2048] = { 0 }; CString str;
//s[0] = 'f'; s[1] = 'r';
CWnd::GetDlgItemText(IDC_EDIT1, str);
for (int i = 0; i < str.GetLength(); i++)
s[i] = str[i];
s[str.GetLength()] = '