X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3af706cc3164bacc24899e0fc827c28e7ea812b6..26ee65c723cf55822c540506f064ec11d9b26858:/samples/image/image.cpp diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 0f8193546e..99c3ab73eb 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -185,7 +185,7 @@ public: wxFileName::SplitPath(savefilename, NULL, NULL, &extension); bool saved = false; - if ( extension == _T("bpp") ) + if ( extension == _T("bmp") ) { static const int bppvalues[] = { @@ -460,14 +460,14 @@ END_EVENT_TABLE() #endif // wxHAVE_RAW_BITMAP BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) + EVT_PAINT(MyCanvas::OnPaint) END_EVENT_TABLE() MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER ) - , m_bmpSmileXpm((const char **) smile_xpm) - , m_iconSmileXpm((const char **) smile_xpm) + : wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER ) + , m_bmpSmileXpm(smile_xpm) + , m_iconSmileXpm(smile_xpm) { my_horse_ani = NULL; m_ani_images = 0 ; @@ -1168,6 +1168,9 @@ void MyFrame::OnPaste(wxCommandEvent& WXUNUSED(event)) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + wxInitAllImageHandlers(); wxFrame *frame = new MyFrame();