CString str;
str.Format("%s/r/n",szMessage);
CFile f("d://rr.txt",CFile::modeWrite|CFile::modeCreate|CFile::modeNoTruncate);
f.SeekToEnd();//定位到文件尾,不覆盖原来的东西
f.Write(str.GetBuffer(),str.GetLength());
f.Close()
str.Format("%s/r/n",szMessage);
CFile f("d://rr.txt",CFile::modeWrite|CFile::modeCreate|CFile::modeNoTruncate);
f.SeekToEnd();//定位到文件尾,不覆盖原来的东西
f.Write(str.GetBuffer(),str.GetLength());
f.Close()