X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa89a22b8e47000c98bff05c6f545f331f1c353..8f4d9fcd9a1133442aa733e978231b01956e641b:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 221fad9643..203f6f9898 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -31,7 +31,7 @@ #include "wx/toolbar.h" -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) +#if !defined(__WXMSW__) #include "mondrian.xpm" #endif @@ -172,8 +172,10 @@ MyFrame::MyFrame(wxWindow *parent, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxSUNKEN_BORDER); +#if wxUSE_TOOLBAR CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL); InitToolBar(GetToolBar()); +#endif // wxUSE_TOOLBAR // Accelerators wxAcceleratorEntry entries[3]; @@ -275,7 +277,13 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->Show(TRUE); } -void MyFrame::OnSize(wxSizeEvent& event) +void MyFrame::OnSize(wxSizeEvent& + #ifdef __WXUNIVERSAL__ + event + #else + WXUNUSED(event) + #endif + ) { int w, h; GetClientSize(&w, &h); @@ -291,6 +299,7 @@ void MyFrame::OnSize(wxSizeEvent& event) #endif } +#if wxUSE_TOOLBAR void MyFrame::InitToolBar(wxToolBar* toolBar) { wxBitmap* bitmaps[8]; @@ -332,6 +341,7 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) for (i = 0; i < 8; i++) delete bitmaps[i]; } +#endif // wxUSE_TOOLBAR // --------------------------------------------------------------------------- // MyCanvas