- // Initialize child subwindow members.
- BombsCanvas = NULL;
-
- SetIcon(wxICON(bombs));
-
- CreateStatusBar();
-
- // Create a menu bar for the frame
- wxMenuBar *menuBar1 = new wxMenuBar;
- wxMenu *menu1 = new wxMenu;
- menu1->Append(IDM_EXIT, _T("E&xit")); // , "Quit the program");
- menu1->AppendSeparator();
- menu1->Append(IDM_ABOUT, _T("&About...")); // , "Infos on wxBombs");
- menuBar1->Append(menu1, _T("&File"));
- wxMenu *menu2 = new wxMenu;
- menu2->Append(IDM_RESTART, _T("&Restart")); // , "Clear the play field");
- menu2->AppendSeparator();
- menu2->Append(IDM_EASY, _T("&Easy"), wxEmptyString, TRUE); // "10x10 play field", TRUE);
- menu2->Append(IDM_MEDIUM, _T("&Medium"), wxEmptyString, TRUE); // "15x15 play field", TRUE);
- menu2->Append(IDM_DIFFICULT, _T("&Difficult"), wxEmptyString, TRUE); // "25x20 play field", TRUE);
- menuBar1->Append(menu2, _T("&Game"));
- SetMenuBar(menuBar1);
- menuBar=menuBar1;
- menuBar->Check(wxGetApp().level, TRUE);
-
- // Create child subwindows.
- BombsCanvas = new BombsCanvasClass(this);
-
- // Ensure the subwindows get resized o.k.
-// OnSize(width, height);
-
- // Centre frame on the screen.
- Centre(wxBOTH);
-
- // Show the frame.
- Show(TRUE);
-}