#include "wx/wx.h" class HelloWorldApp : public wxApp { public: virtual bool OnInit(); }; class HWFrame : public wxFrame { public: HWFrame() : wxFrame( (wxFrame*)NULL, -1, _T("Hello wxWidgets World")) { wxMenu *file = new wxMenu; file->Append( EvQuit, "E&xit" ); } void OnQuit(wxCommandEvent& event) {} enum { EvQuit, EvLoad, EvSave, EvClear, EvNone }; private: DECLARE_EVENT_TABLE() }; BEGIN_EVENT_TABLE(HWFrame, wxFrame) EVT_MENU( HWFrame::EvQuit, HWFrame::OnQuit ) END_EVENT_TABLE() DECLARE_APP(HelloWorldApp) // normally in .h IMPLEMENT_APP(HelloWorldApp) bool HelloWorldApp::OnInit() { wxFrame *frame = new HWFrame(); frame->CreateStatusBar(); frame->SetStatusText(_T("Hello World")); frame->Show(TRUE); SetTopWindow(frame); return true; }