007
23.03.2007, 13:18 Uhr
projekter
|
Hier der ganze Code:
C++: |
TFileStream *Full = new TFileStream(SaveDialog1->FileName, fmOpenReadWrite || fmShareDenyNone); if(FileExists(SaveDialog1->FileName) == true) { Full->Size = 0; } int SoF; char SW[10]; for(int i = 1; i <= ComboBox1->Items->Count; i++){ try{ SoF = Full->Size; if(DirectoryExists("C:\\Temp") == false) { CreateDir("C:\\Temp"); } MainForm->Daten[i]->Lines->Add(MainForm->Titel[i]); MainForm->Daten[i]->Lines->SaveToFile("C:\\Temp\\dat.rtf"); TFileStream *OF = new TFileStream("C:\\Temp\\dat.rtf", fmOpenReadWrite || fmShareDenyNone); try{ Full->Seek(0, soFromEnd); OF->Position = 0; Full->CopyFrom(OF, 0); Full->Seek(0, soFromEnd); OF->Free(); }catch(...){ OF->Free(); } MainForm->Daten[i]->Lines->Delete(0); DeleteFile("C:\\Temp\\dat.rtf"); itoa(SoF, SW, 10); Full->Seek(0, soFromEnd); Full->WriteBuffer(SW, sizeof(SW)); Progress->StepBy(1); Application->ProcessMessages(); }catch(...){ } }
|
Dieser Post wurde am 23.03.2007 um 13:18 Uhr von projekter editiert. |