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
34
MyFrame* frame = new MyFrame(0L, _("wxWidgets Application Template"));
39
int idMenuQuit = wxNewId();
40
int idMenuAbout = wxNewId();
42
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
43
EVT_MENU(idMenuQuit, MyFrame::OnQuit)
44
EVT_MENU(idMenuAbout, MyFrame::OnAbout)
47
MyFrame::MyFrame(wxFrame *frame, const wxString& title)
48
: wxFrame(frame, -1, title)
52
wxMenuBar* mbar = new wxMenuBar();
53
wxMenu* fileMenu = new wxMenu(_T(""));
54
fileMenu->Append(idMenuQuit, _("&Quit\tAlt-F4"), _("Quit the application"));
55
mbar->Append(fileMenu, _("&File"));
57
wxMenu* helpMenu = new wxMenu(_T(""));
58
helpMenu->Append(idMenuAbout, _("&About\tF1"), _("Show info about this application"));
59
mbar->Append(helpMenu, _("&Help"));
65
// create a status bar with some information about the used wxWidgets version
67
SetStatusText(_("Hello Code::Blocks user !"),0);
68
SetStatusText(wxbuildinfo(short_f),1);
69
#endif // wxUSE_STATUSBAR
76
void MyFrame::OnQuit(wxCommandEvent& event)
81
void MyFrame::OnAbout(wxCommandEvent& event)
83
wxString msg = wxbuildinfo(long_f);
84
wxMessageBox(msg, _("Welcome to..."));