4
enum wxbuildinfoformat {
7
wxString wxbuildinfo(wxbuildinfoformat format)
9
wxString wxbuild(wxVERSION_STRING);
11
if (format == long_f )
13
#if defined(__WXMSW__)
14
wxbuild << _T("-Windows");
15
#elif defined(__UNIX__)
16
wxbuild << _T("-Linux");
20
wxbuild << _T("-unicode build");
22
wxbuild << _T("-ANSI build");
23
#endif // wxUSE_UNICODE
29
int idMenuQuit = wxNewId();
30
int idMenuAbout = wxNewId();
32
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
33
EVT_MENU(idMenuQuit, MyFrame::OnQuit)
34
EVT_MENU(idMenuAbout, MyFrame::OnAbout)
37
MyFrame::MyFrame(wxFrame *frame, const wxString& title)
38
: wxFrame(frame, -1, title)
42
wxMenuBar* mbar = new wxMenuBar();
43
wxMenu* fileMenu = new wxMenu(_T(""));
44
fileMenu->Append(idMenuQuit, _("&Quit\tAlt-F4"), _("Quit the application"));
45
mbar->Append(fileMenu, _("&File"));
47
wxMenu* helpMenu = new wxMenu(_T(""));
48
helpMenu->Append(idMenuAbout, _("&About\tF1"), _("Show info about this application"));
49
mbar->Append(helpMenu, _("&Help"));
55
// create a status bar with some information about the used wxWidgets version
57
SetStatusText(_("Hello Code::Blocks user !"),0);
58
SetStatusText(wxbuildinfo(short_f),1);
59
#endif // wxUSE_STATUSBAR
66
void MyFrame::OnQuit(wxCommandEvent& event)
71
void MyFrame::OnAbout(wxCommandEvent& event)
73
wxString msg = wxbuildinfo(long_f);
74
wxMessageBox(msg, _("Welcome to..."));