]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/png/pngdemo.cpp
wxMotif compiles (and runs minimal sample) again after wxMenu changes
[wxWidgets.git] / samples / png / pngdemo.cpp
index be10ff0534c0408b3398b97aff04645644473c73..c3ef8185092926c22c9036d27387ff4d0dff9978 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"
@@ -40,8 +42,9 @@ bool MyApp::OnInit(void)
 {
 #ifdef __WXMSW__
   wxBitmap::AddHandler(new wxPNGFileHandler);
-//  wxBitmap::AddHandler(new wxXPMFileHandler);
-//  wxBitmap::AddHandler(new wxXPMDataHandler);
+#endif
+#ifdef __WXGTK__
+  wxImage::AddHandler(new wxPNGHandler);
 #endif
 
   // Create the main frame window
@@ -207,12 +210,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;
-}