All,

The below is a "rough and ready" guide to building a MS HTML help system for your application. It will show you how to generate the .chm file, and how to link to it from your GUI application. I've included a zip folder containing all the example files you'll need.

The MS HTML system is based on a single .chm file, it's kind of like a zip folder with all the HTML contained within it. To create the .chm file you have to download free tools from Microsoft:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp

You need HtmlHelp.exe, download and install. The key file is hhc.exe which 'compiles' your html files into a .chm file. Copy hhc.exe and place it in the same folder as the files in the attached zip. There is plenty of documentation on the MS site to explain the actual details, but:

To build the .chm, hhc.exe needs to have 4 files as well as your HTML documentation:

.hhp file which contains the options and all the HTML files to be included in your help file (any images will be included automatically) .hhc file which contains the table of contents for your help system (the tree on the left of the help system) the TOC is itself HTML. .h file which contains numeric constants to identify topics (these constants are used within your GUI)
.ali file which maps the numeric constants to actual HTML pages.

Typically you'll generate these files automatically from your documentation. Once you've got these files, you now build your .chm file:

cd to the dir with the example zipped files then:

hhc.exe help.hhp

Now run gui.pl in the same folder, it'll bring up a window with a few buttons. When you click on the button, the html help system automatically opens and goes to the correct topic. You can create as many topics as you like - it's quite flexible. When you distribute your app, you just need the .chm file.

Cheers,

jez.



Reply via email to