]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/png/pngdemo.cpp
optimizations: more functions made inline, added Alloc()/Shrink() function for
[wxWidgets.git] / samples / png / pngdemo.cpp
index 0106b34ed951dda758dc08f9f8323cbfdebbd749..05fb32d7efc866601b46f933bd2bef25cb619f6a 100644 (file)
@@ -20,7 +20,7 @@
 #pragma hdrstop
 #endif
 
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
 #include <wx/pnghand.h>
 #endif
 
@@ -37,7 +37,7 @@ MyApp::MyApp()
 
 bool MyApp::OnInit(void)
 {
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
   wxBitmap::AddHandler(new wxPNGFileHandler);
 #endif
 
@@ -159,7 +159,7 @@ void MyCanvas::OnPaint(wxPaintEvent& event)
     // Normal, non-transparent blitting
     dc.Blit(20, 20, g_TestBitmap->GetWidth(), g_TestBitmap->GetHeight(), & memDC, 0, 0, wxCOPY, FALSE);
 
-    memDC.SelectObject(NULL);
+    memDC.SelectObject(wxNullBitmap);
   }
 
   if ( g_TestBitmap && g_TestBitmap->Ok() )
@@ -171,7 +171,7 @@ void MyCanvas::OnPaint(wxPaintEvent& event)
     dc.Blit(20 + g_TestBitmap->GetWidth() + 20, 20, g_TestBitmap->GetWidth(), g_TestBitmap->GetHeight(), & memDC,
       0, 0, wxCOPY, TRUE);
 
-    memDC.SelectObject(NULL);
+    memDC.SelectObject(wxNullBitmap);
   }
 }