Deciding on a help format
With so many different help formats available, you may be wondering which is best for you. The following clarifies some of the pros and cons, and you can also look at the 'help' sample in the wxWidgets distribution which demonstrates a variety of formats and help controllers.
Unix
If you want all the power of HTML for your help files, then you may consider using plain HTML files on Unix (invoked by wxExtHelpController). However, the formatting of most help files doesn't need to be very complex and so a better approach would be to use the internal wxHTML help system and wxHtmlHelpController. You may have problems using this system under Motif in 256 colour mode, related to the XPM icons used in the viewer, so you could try the simpler wxHelpControllerHtml instead which is still powered by wxHTML.
Accessing help from an application
Sometimes one can rely on wxHelpController being aliased to the standard help system for that platform (wxHTML help for Unix, WinHelp for Windows). To use a different help controller than the standard one, you have to include the file for that controller and create an object using the relevant class name (e.g. 'wxCHMHelpController') rather than simply using 'wxHelpController'. Please see the wxHelpController documentation in the wxWidgets manual for details.
To create and initialize a help controller:
helpController = new wxCHMHelpController;
helpController->Initialize("myfile");
To access the contents, use code like the following:
helpController->LoadFile("myapp");
helpController->DisplayContents();
To access a particular section, use code like the following:
helpController->LoadFile("myapp");
helpController->DisplaySection("Diagram cards");
DisplaySection has different meanings for different help controllers, but for most controllers it does a keyword search. It can also be used to display a particular HTML file within the help file, for example in MS HTML Help.
To clean up as the application is ending:
helpController->Quit();
delete helpController;