X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3b7706c4f3c34dfe552726c4438a1565a9944b0..7e48f6d96450ca4de43069a6ff0308a74f07d05d:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 6c521e7a9d..c6e71b6ee0 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -178,6 +178,7 @@ MyFrame::MyFrame(wxWindow *parent, InitToolBar(GetToolBar()); #endif // wxUSE_TOOLBAR +#if wxUSE_ACCEL // Accelerators wxAcceleratorEntry entries[3]; entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW); @@ -185,6 +186,7 @@ MyFrame::MyFrame(wxWindow *parent, entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT); wxAcceleratorTable accel(3, entries); SetAcceleratorTable(accel); +#endif // wxUSE_ACCEL } void MyFrame::OnClose(wxCloseEvent& event) @@ -234,6 +236,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->SetIcon(wxIcon( mondrian_xpm )); #endif +#if wxUSE_MENUS // Make a menubar wxMenu *file_menu = new wxMenu; @@ -260,6 +263,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) // Associate the menu bar with the frame subframe->SetMenuBar(menu_bar); +#endif // wxUSE_MENUS #if wxUSE_STATUSBAR subframe->CreateStatusBar(); @@ -278,7 +282,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->Show(true); } -void MyFrame::OnSize(wxSizeEvent& +void MyFrame::OnSize(wxSizeEvent& #ifdef __WXUNIVERSAL__ event #else @@ -295,7 +299,7 @@ void MyFrame::OnSize(wxSizeEvent& // FIXME: On wxX11, we need the MDI frame to process this // event, but on other platforms this should not // be done. -#ifdef __WXUNIVERSAL__ +#ifdef __WXUNIVERSAL__ event.Skip(); #endif } @@ -517,5 +521,3 @@ void MyChild::OnClose(wxCloseEvent& event) event.Skip(); } - -