]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/png/pngdemo.cpp
Removed two more GUI lock-ups. This time when
[wxWidgets.git] / samples / png / pngdemo.cpp
index da50f96d5daa893d50e6738948bde2ee40836694..520bb10fd10b2e3f7f883998647543259a42c1dc 100644 (file)
 #endif
 
 #ifdef __WXMSW__
-#include <wx/pnghand.h>
-// #include <wx/xpmhand.h>
+#include "wx/pnghand.h"
+#endif
+#ifdef __WXGTK__
+#include "wx/image.h"
 #endif
 
 #include "pngdemo.h"
@@ -38,11 +40,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));