X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69d2886dfe999744dde8ae0d11d67b42613a0a11..aeafc354935512ddba84502bc60ca3b6246c14ce:/samples/dynamic/minimal.cpp diff --git a/samples/dynamic/minimal.cpp b/samples/dynamic/minimal.cpp index 0015847436..354d3aaec4 100644 --- a/samples/dynamic/minimal.cpp +++ b/samples/dynamic/minimal.cpp @@ -25,6 +25,10 @@ #include "wx/wx.h" #endif +#ifdef __WXGTK__ +#include "mondrian.xpm" +#endif + // Define a new application type class MyApp: public wxApp { public: @@ -54,17 +58,16 @@ IMPLEMENT_APP (MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Minimal wxWindows App", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); frame->Connect( MINIMAL_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnQuit ); frame->Connect( MINIMAL_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnAbout ); // Give it an icon -#ifdef __WINDOWS__ +#ifdef __WXMSW__ frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("aiai.xbm")); +#else + frame->SetIcon(wxIcon(mondrian_xpm)); #endif // Make a menubar @@ -79,8 +82,7 @@ bool MyApp::OnInit(void) // Make a panel with a message wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); - wxStaticText *msg = new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), - 0); + (void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0); // Show the frame frame->Show(TRUE); @@ -95,12 +97,12 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) {} -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& event) +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", "About Minimal", wxYES_NO|wxCANCEL);