+
+// ----------------------------------------------------------------------------
+// main frame
+// ----------------------------------------------------------------------------
+
+
+// frame constructor
+ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
+ : wxFrame((wxFrame *)NULL, -1, 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(".");
+ ret = help.AddBook("helpfiles/testing.hhp");
+ if (! ret)
+ wxMessageBox("Failed adding book helpfiles/testing.hhp");
+ ret = help.AddBook("helpfiles/another.hhp");
+ if (! ret)
+ wxMessageBox("Failed adding book helpfiles/another.hhp");
+ }
+
+
+// event handlers
+
+ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
+ {
+ // TRUE is to force the frame to close
+ Close(TRUE);
+ }
+
+ void MyFrame::OnHelp(wxCommandEvent& WXUNUSED(event))