]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/glcanvas/samples/cube/cube.cpp
changes for wxMSW compilation
[wxWidgets.git] / utils / glcanvas / samples / cube / cube.cpp
index 97ec64dbf5b87f32df03e3ead82bac3fff1eca90..6a756b2893e0f462577caaee864aa59371762685 100644 (file)
@@ -29,9 +29,6 @@
 
 #include "cube.h"
 
-// This statement initializes the whole application and calls OnInit
-MyApp myApp;
-
 IMPLEMENT_APP(MyApp)
 
 // `Main program' equivalent, creating windows and returning main app frame
@@ -125,6 +122,10 @@ TestGLCanvas::~TestGLCanvas(void)
 
 void TestGLCanvas::OnPaint( wxPaintEvent& event )
 {
+    // This is a dummy, to avoid an endless succession of paint messages.
+    // OnPaint handlers must always create a wxPaintDC.
+    wxPaintDC dc(this);
+
     if ( !GetContext() )
         return;