EVT_MENU(MDI_QUIT, MyFrame::OnQuit)
EVT_CLOSE(MyFrame::OnClose)
-
EVT_SIZE(MyFrame::OnSize)
END_EVENT_TABLE()
InitToolBar(GetToolBar());
#endif // wxUSE_TOOLBAR
+#if wxUSE_ACCEL
// Accelerators
wxAcceleratorEntry entries[3];
entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW);
entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT);
wxAcceleratorTable accel(3, entries);
SetAcceleratorTable(accel);
+#endif // wxUSE_ACCEL
}
void MyFrame::OnClose(wxCloseEvent& event)
subframe->SetIcon(wxIcon( mondrian_xpm ));
#endif
+#if wxUSE_MENUS
// Make a menubar
wxMenu *file_menu = new wxMenu;
// Associate the menu bar with the frame
subframe->SetMenuBar(menu_bar);
+#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
subframe->CreateStatusBar();
subframe->Show(true);
}
-void MyFrame::OnSize(wxSizeEvent&
+void MyFrame::OnSize(wxSizeEvent&
#ifdef __WXUNIVERSAL__
event
#else
// 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
}
event.Skip();
}
-
-