class wxDummyConsoleApp : public wxAppConsole
{
public:
+ wxDummyConsoleApp() { }
+
virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; }
+
+ DECLARE_NO_COPY_CLASS(wxDummyConsoleApp)
};
// we need a special kind of auto pointer to wxApp which not only deletes the
wxTheApp = ptr;
}
+
+ DECLARE_NO_COPY_CLASS(wxAppPtr)
};
// class to ensure that wxAppBase::CleanUp() is called if our Initialize()
// free it when doing cleanup to avoid memory leaks
wchar_t **argv;
#endif // wxUSE_UNICODE
+
+ DECLARE_NO_COPY_CLASS(InitData)
} gs_initData;
// ============================================================================
if ( fnCreate )
{
// he did, try to create the custom wxApp object
- app.Set((*fnCreate)());
+ //
+ // NB: cast is needed because for the backwards-compatibility
+ // reasons wxTheApp is really a wxApp and not just
+ // wxAppConsole...
+ app.Set((wxApp*)(*fnCreate)());
}
}