X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f07941fc73d4f263a33e767263c4da507ba9bc54..d2e6c14109b521468922c85c4041103aa28e39a9:/samples/artprov/arttest.cpp diff --git a/samples/artprov/arttest.cpp b/samples/artprov/arttest.cpp index 186fd43003..45c5d1f45f 100644 --- a/samples/artprov/arttest.cpp +++ b/samples/artprov/arttest.cpp @@ -20,7 +20,7 @@ #include "wx/wx.h" #endif -#ifndef __WXMSW__ +#if !defined(__WXMSW__) && !defined(__WXPM__) #include "mondrian.xpm" #endif @@ -52,7 +52,7 @@ private: #endif // wxUSE_LOG void OnBrowser(wxCommandEvent& event); void OnPlugProvider(wxCommandEvent& event); - + DECLARE_EVENT_TABLE() }; @@ -96,6 +96,9 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // create the main application window MyFrame *frame = new MyFrame(_T("wxArtProvider sample"), wxPoint(50, 50), wxSize(450, 340)); @@ -156,7 +159,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, wxMenu *helpMenu = new wxMenu; helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog")); - menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider")); + menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider")); menuFile->AppendSeparator(); #if wxUSE_LOG @@ -216,7 +219,7 @@ void MyFrame::OnBrowser(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnPlugProvider(wxCommandEvent& event) { if ( event.IsChecked() ) - wxArtProvider::PushProvider(new MyArtProvider); + wxArtProvider::Push(new MyArtProvider); else - wxArtProvider::PopProvider(); + wxArtProvider::Pop(); }