X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/227869da8d090e2364530dd310e2d63ad18edecf..015e69f36dfbc469eef59456f973d0567e865d70:/samples/png/pngdemo.cpp?ds=sidebyside diff --git a/samples/png/pngdemo.cpp b/samples/png/pngdemo.cpp index be10ff0534..473340a6e9 100644 --- a/samples/png/pngdemo.cpp +++ b/samples/png/pngdemo.cpp @@ -20,10 +20,7 @@ #pragma hdrstop #endif -#ifdef __WXMSW__ -#include -// #include -#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; -}