+
+// ----------------------------------------------------------------------------
+// main frame
+// ----------------------------------------------------------------------------
+
+
+// frame constructor
+ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size),
+ help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES)
+ {
+ // create a menu bar
+ wxMenu *menuFile = new wxMenu;
+
+ menuFile->Append(Minimal_Help, _("&Help"));
+ menuFile->Append(Minimal_Quit, _("E&xit"));
+
+ // now append the freshly created menu to the menu bar...
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append(menuFile, _("&File"));
+
+ // ... and attach this menu bar to the frame
+ SetMenuBar(menuBar);
+
+ help.UseConfig(wxConfig::Get());
+ bool ret;
+ help.SetTempDir(wxT("."));
+ ret = help.AddBook(wxFileName(wxT("helpfiles/testing.hhp"), wxPATH_UNIX));
+ if (! ret)
+ wxMessageBox(wxT("Failed adding book helpfiles/testing.hhp"));
+ ret = help.AddBook(wxFileName(wxT("helpfiles/another.hhp"), wxPATH_UNIX));
+ if (! ret)
+ wxMessageBox(_("Failed adding book helpfiles/another.hhp"));
+ }
+
+
+// event handlers
+
+ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))