-#if 0
- // Experimental: change the window menu
- wxMenu* windowMenu = new wxMenu;
- windowMenu->Append(5000, "My menu item!");
- frame->SetWindowMenu(windowMenu);
-#endif
+
+ // 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);
+ }