void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
// menu items
Minimal_Quit = 1,
Minimal_About,
- Minimal_Test1,
- Minimal_Test2,
-
- // controls start here (the numbers are, of course, arbitrary)
- Minimal_Text = 1000,
};
// ----------------------------------------------------------------------------
SetIcon(wxICON(mondrian));
// create a menu bar
- wxMenu *menuFile = new wxMenu;
+ wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
menuFile->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog");
menuFile->AppendSeparator();
menuFile->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
// now append the freshly created menu to the menu bar...
- wxMenuBar *menuBar = new wxMenuBar;
+ wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, "&File");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
+#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText("Welcome to wxWindows!");
+#endif // wxUSE_STATUSBAR
}
wxMessageBox(msg, "About Minimal", wxOK | wxICON_INFORMATION, this);
}
+