---恢复内容开始---
SetDlgItemText( IDC_EDIT_HISTORY , "" );
CFileDialog filedlg( TRUE ); filedlg.m_ofn.lpstrFilter="txt(*.txt)\0*.txt"; filedlg.m_ofn.lpstrDefExt = "txt"; if(IDOK==filedlg.DoModal()) { CStdioFile file; CString strLine = "" , strtemp ; if(!file.Open( filedlg.GetPathName() , CFile::modeRead))return;//打开*.TXT这个文件,打开形式为读取 while(file.ReadString( strtemp ) ) { strLine += strtemp + "\r\n"; } file.Close(); UpdateData(false); SetDlgItemText( IDC_EDIT_HISTORY , strLine ); m_EditHistory.LineScroll(m_EditHistory.GetLineCount()); }---恢复内容结束---