X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79144b8a47e93d03d136fd39cd730060930dec77..a8f6ef519066976e75833343952f7b6dd70dafa0:/samples/png/pngdemo.cpp diff --git a/samples/png/pngdemo.cpp b/samples/png/pngdemo.cpp index c3ef818509..0d88f11699 100644 --- a/samples/png/pngdemo.cpp +++ b/samples/png/pngdemo.cpp @@ -20,12 +20,7 @@ #pragma hdrstop #endif -#ifdef __WXMSW__ -#include "wx/pnghand.h" -#endif -#ifdef __WXGTK__ #include "wx/image.h" -#endif #include "pngdemo.h" @@ -40,12 +35,7 @@ MyApp::MyApp() bool MyApp::OnInit(void) { -#ifdef __WXMSW__ - wxBitmap::AddHandler(new wxPNGFileHandler); -#endif -#ifdef __WXGTK__ wxImage::AddHandler(new wxPNGHandler); -#endif // Create the main frame window frame = new MyFrame((wxFrame *) NULL, "wxPNGBitmap Demo", wxPoint(0, 0), wxSize(300, 300)); @@ -110,8 +100,9 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event)) { - wxString f = wxFileSelector( "Save Image", (const char *)NULL, (const char *)NULL, - "png", "PNG files (*.png)|*.png" ); + wxString f = wxFileSelector( wxT("Save Image"), (const wxChar *)NULL, + (const wxChar *)NULL, + wxT("png"), wxT("PNG files (*.png)|*.png") ); if (f == "") return; @@ -138,8 +129,9 @@ void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event)) { // Show file selector. - wxString f = wxFileSelector("Open Image", (const char *) NULL, (const char *) NULL,"png", - "PNG files (*.png)|*.png"); + wxString f = wxFileSelector(wxT("Open Image"), (const wxChar *) NULL, + (const wxChar *) NULL, wxT("png"), + wxT("PNG files (*.png)|*.png")); if (f == "") return;