I'd do some more changes:Code:CFileDialog FileDialog(FALSE, _T("txt"), _T("downloader"), OFN_CREATEPROMPT|OFN_HIDEREADONLY | OFN_SHOWHELP|OFN_OVERWRITEPROMPT|OFN_LONGNAMES, _T("Save the file as (*.txt)|*.txt||)"); if (FileDialog.DoModal() == IDCANCEL) return; _TCHAR sFileName[MAX_PATH]; // 260, not 255 BeginWaitCursor(); UpdateData(true); _tcscpy(sFileName, FileDialog.GetFileName()); sourceFile.open(sFileName, ios:ut); if(!sourceFile.is_open()) AfxMessageBox( _T("file for saving not opened")); else for (POSITION Pos1 = pFrame->Batch_boardList.GetHeadPosition(); Pos1 != NULL sourceFile << pFrame->Batch_boardList.GetNext(Pos1) + _T('\n'); sourceFile.close();




Victor Nijegorodov
Reply With Quote
