I can't manage to save a text file using the "saveFileDialog". I have looked trough many forums and tutorials, but i cant get the right information from neither. So far i have managed to open the Save file dialog and it actualy saves an empty text file with the right name and path,BUT, and this is the part i have trouble with, its EMPTY, and i dont know where you show what information to save on the file and what methods to use!
Here is the code :
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
saveFileDialog1->ShowDialog();
}
private: System::Void saveFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
System::IO::FileStream ^ fs = safe_cast<System::IO::FileStream^>(saveFileDialog1->OpenFile());
}
So can somebody tell me how and what to do?
Thanks in advance!