- wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize";
- wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
- WXSERIAL(wxObject) *serial;
-
- if (!lib) {
- wxMessageBox("Can't load wxSerial dynamic library.", "Alert !");
- return;
- }
- serial = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
-
- if (!serial) {
- wxString message;
-
- message.Printf("Can't find the serialization object (%s) for the object %s",
- WXSTRINGCAST obj_name, WXSTRINGCAST GetClassInfo()->GetClassName());
- wxMessageBox(message, "Alert !");
- return;
- }
-
- serial->SetObject(this);
- serial->StoreObject(stream);
-}