+
+ // This shows that the standard window menu may be customized:
+ wxMenu * const windowMenu = GetWindowMenu();
+ if ( windowMenu )
+ {
+ // we can change the labels of standard items (which also means we can
+ // set up accelerators for them as they're part of the label)
+ windowMenu->SetLabel(wxID_MDI_WINDOW_TILE_HORZ,
+ "&Tile horizontally\tCtrl-Shift-H");
+ windowMenu->SetLabel(wxID_MDI_WINDOW_TILE_VERT,
+ "&Tile vertically\tCtrl-Shift-V");
+
+ // we can also change the help string
+ windowMenu->SetHelpString(wxID_MDI_WINDOW_CASCADE,
+ "Arrange windows in cascade");
+
+ // we can remove some items
+ windowMenu->Delete(wxID_MDI_WINDOW_ARRANGE_ICONS);
+
+ // and we can add completely custom commands -- but then we must handle
+ // them ourselves, see OnCloseAll()
+ windowMenu->AppendSeparator();
+ windowMenu->Append(wxID_CLOSE_ALL, "&Close all windows\tCtrl-Shift-C",
+ "Close all open windows");
+
+ SetWindowMenu(windowMenu);
+ }
+#endif // wxUSE_MENUS
+
+#if wxUSE_STATUSBAR
+ CreateStatusBar();
+#endif // wxUSE_STATUSBAR
+
+
+ m_textWindow = new wxTextCtrl(this, wxID_ANY, "A help window",
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE | wxSUNKEN_BORDER);
+
+#if wxUSE_TOOLBAR
+ CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
+ InitToolBar(GetToolBar());
+#endif // wxUSE_TOOLBAR
+
+#if wxUSE_ACCEL
+ // Accelerators
+ wxAcceleratorEntry entries[3];
+ entries[0].Set(wxACCEL_CTRL, (int) 'N', wxID_NEW);
+ entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_EXIT);
+ entries[2].Set(wxACCEL_CTRL, (int) 'A', wxID_ABOUT);
+ wxAcceleratorTable accel(3, entries);
+ SetAcceleratorTable(accel);
+#endif // wxUSE_ACCEL
+
+ // connect it only now, after creating m_textWindow
+ Connect(wxEVT_SIZE, wxSizeEventHandler(MyFrame::OnSize));