X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/457814b5aa2ee5c83abc65a6aee2a3ebcb1af34f..fd495ab3ea1282ddb8bb0cd0fb79fc758ae5fcee:/utils/dialoged/src/dialoged.cpp diff --git a/utils/dialoged/src/dialoged.cpp b/utils/dialoged/src/dialoged.cpp index 1abe2b507c..d59b19d8f1 100644 --- a/utils/dialoged/src/dialoged.cpp +++ b/utils/dialoged/src/dialoged.cpp @@ -1,4 +1,3 @@ -///////////////////////////////////////////////////////////////////////////// // Name: dialoged.cpp // Purpose: Main Dialog Editor implementation file // Author: Julian Smart @@ -26,28 +25,39 @@ #include "dialoged.h" -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - IMPLEMENT_APP(MyApp) +BEGIN_EVENT_TABLE(MyApp, wxApp) +EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu) +EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu) +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; +}