wxTextCtrl has a special function just for saving its
contents to a file
- saves a few lines of code.
Look it up in the wxWindows refference, i forgot what its called.
They have simple names:
wxTextCtrl.SaveFile(filename)
and
wxTextCtrl.LoadFile(filename)
Both return TRUE if success, FALSE otherwise.