]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/samples/ogledit/ogledit.cpp
Compile and build fixes for wxGTK and wxMotif
[wxWidgets.git] / utils / ogl / samples / ogledit / ogledit.cpp
index cc18d2d2c1226211741b8722b5b8a3db3f7f8769..7aac4d1ab021e6b9192fd43f5d531d38c8a38310 100644 (file)
@@ -24,8 +24,8 @@
 #include <wx/wx.h>
 #endif
 
-#if !USE_DOC_VIEW_ARCHITECTURE
-#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
+#if !wxUSE_DOC_VIEW_ARCHITECTURE
+#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
 #endif
 
 #include "ogledit.h"
@@ -37,9 +37,6 @@
 // in the application itself.
 IMPLEMENT_APP(MyApp)
 
-// This statement initialises the whole application
-MyApp myApp;
-
 MyApp::MyApp(void)
 {
   frame = NULL;
@@ -116,7 +113,7 @@ bool MyApp::OnInit(void)
   menu_bar->Append(help_menu, "&Help");
 
   frame->canvas = frame->CreateCanvas(NULL, frame);
-  frame->palette = myApp.CreatePalette(frame);
+  frame->palette = wxGetApp().CreatePalette(frame);
   myDocManager->CreateDocument("", wxDOC_NEW);
 
   //// Associate the menu bar with the frame
@@ -206,6 +203,6 @@ MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent)
 
 MyFrame *GetMainFrame(void)
 {
-  return myApp.frame;
+  return wxGetApp().frame;
 }