-/////////////////////////////////////////////////////////////////////////////
// Name: dialoged.cpp
// Purpose: Main Dialog Editor implementation file
// Author: Julian Smart
#include "dialoged.h"
-// A macro needed for some compilers (AIX) that need 'main' to be defined
-// in the application itself.
-IMPLEMENT_WXWIN_MAIN
+#if !wxUSE_PROPSHEET
+#error Please set wxUSE_PROPSHEET to 1 in setup.h.
+#endif
IMPLEMENT_APP(MyApp)
+BEGIN_EVENT_TABLE(MyApp, wxApp)
+END_EVENT_TABLE()
+
MyApp::MyApp(void)
{
}
-wxResourceManager theResourceManager;
+wxResourceManager *theResourceManager = NULL;
+
+#include "symbtabl.h"
bool MyApp::OnInit(void)
{
- theResourceManager.Initialize();
- theResourceManager.ShowResourceEditor(TRUE);
-
- if (argc > 1)
- theResourceManager.Load(argv[1]);
-
- SetTopWindow(theResourceManager.GetEditorFrame());
-
- return TRUE;
+ theResourceManager = new wxResourceManager;
+ theResourceManager->Initialize();
+
+ theResourceManager->ShowResourceEditor(TRUE);
+
+ if (argc > 1)
+ theResourceManager->Load(argv[1]);
+
+ SetTopWindow(theResourceManager->GetEditorFrame());
+
+ return TRUE;
}
+int MyApp::OnExit(void)
+{
+ delete theResourceManager;
+ theResourceManager = NULL;
+ return 0;
+}