- BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
- EVT_MENU(Minimal_About, MyFrame::OnAbout)
- END_EVENT_TABLE()
-
- // Create a new application object: this macro will allow wxWidgets to create
- // the application object during program execution (it's better than using a
- // static object for many reasons) and also declares the accessor function
- // wxGetApp() which will return the reference of the right type (i.e. MyApp and
- // not wxApp)
- IMPLEMENT_APP(MyApp)
-
- // ============================================================================
- // implementation
- // ============================================================================
-
- // ----------------------------------------------------------------------------
- // the application class
- // ----------------------------------------------------------------------------
- // `Main program' equivalent: the program execution "starts" here
- bool MyApp::OnInit()
- {
- wxImage::AddHandler(new wxPNGHandler);
- // Create the main application window
- MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
- wxPoint(50, 50), wxSize(150, 50));
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
+ EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
+END_EVENT_TABLE()
+
+// Create a new application object: this macro will allow wxWidgets to create
+// the application object during program execution (it's better than using a
+// static object for many reasons) and also declares the accessor function
+// wxGetApp() which will return the reference of the right type (i.e. MyApp and
+// not wxApp)
+IMPLEMENT_APP(MyApp)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// the application class
+// ----------------------------------------------------------------------------