Show Sitemap ..Help2HTMLHelpWinHelp

HTMLHelp CHM Buttons

It is possible, to add buttons to the button pane if you are using a compiled help system. You find attached how to add the Previous/Next buttons to a compiled *.CHM file.


The procedure is as follows (thanks to Pete Lees):

1) Open the .hhp file in Notepad.

2) Find the line in the [WINDOWS] section that defines the window type to which you want to add the Previous and Next buttons. It will probably look something like this:

$global_main="Title Bar
Text","TOC.hhc","Index.hhk","default.htm","home.htm",,,,,0x3520,,0x2000,...

3) Make a note of the parameter value in the 12th position in this line (0x2000 in the example above).

4) Start the Windows Calculator and switch to Scientific view.

5) Select the Hex radio button.

6) Enter the value that you noted in step 3, but omit the 0x prefix, which just indicates that the value is hexadecimal. So, in this example, you'd enter 2000.

7) Add 600000 to the value. (The Next button has a value of 200000 and the Previous button has a value of 400000, so you need to enter 600000 to add both buttons to the toolbar.)

For example, 2000 + 600000 = 602000.

8) Enter the new value in the [WINDOWS] section:

Main="Title Bar
Text","TOC.hhc","Index.hhk","default.htm","home.htm",,,,,0x3520,,0x602000,...

9) Make sure that the [OPTIONS] section of the file contains the following line:
Binary TOC=Yes

If the help file is not set up to use a binary TOC then the Previous and Next buttons will be present in the toolbar but permanently greyed-out.

Some more information is documented in a unofficial HTMLHelp Specification at section "Table 5.5.2 Buttons to put in the HH toolbar". See: http://chmspec.nongnu.org/latest/INI.html


Top ...