]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/png/pngdemo.cpp
Added fl (frame layout) to wxWindows, from source tidied by Hans Van Leemputten ...
[wxWidgets.git] / samples / png / pngdemo.cpp
index be10ff0534c0408b3398b97aff04645644473c73..473340a6e95e51fd39794423d36c31388eb2e47d 100644 (file)
 #pragma hdrstop
 #endif
 
-#ifdef __WXMSW__
-#include <wx/pnghand.h>
-// #include <wx/xpmhand.h>
-#endif
+#include "wx/image.h"
 
 #include "pngdemo.h"
 
@@ -38,11 +35,7 @@ MyApp::MyApp()
 
 bool MyApp::OnInit(void)
 {
-#ifdef __WXMSW__
-  wxBitmap::AddHandler(new wxPNGFileHandler);
-//  wxBitmap::AddHandler(new wxXPMFileHandler);
-//  wxBitmap::AddHandler(new wxXPMDataHandler);
-#endif
+  wxImage::AddHandler(new wxPNGHandler);
 
   // Create the main frame window
   frame = new MyFrame((wxFrame *) NULL, "wxPNGBitmap Demo", wxPoint(0, 0), wxSize(300, 300));
@@ -207,12 +200,4 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
   }
 }
 
-// Define the behaviour for the frame closing
-// - must delete all frames except for the main one.
-bool MyFrame::OnClose(void)
-{
-  Show(FALSE);
-
-  return TRUE;
-}