HTML Help Project (HHP) format
Preface
This is documentation on the HHP format used by MS' HTML Help Workshop (HHW) to compile CHM files. There are various titbits of info out there on the web, in Usenet & in the docs for various programs. So far I have not found a complete reference for this format.
This is file has the INI format.
HHW dies if any line is 1024 or more characters (not including CRLF).
Sections
[OPTIONS]
This is a variable=value section sorted by variable name (using memcmp), except for Custom tab, which occurs at the end.
Variable & type | Explanation | Recommended setting |
Auto Index=bool | ||
Auto TOC=number | ||
Binary Index=bool | Yes | |
Binary TOC=bool | Yes | |
CITATION=string | ||
COMPRESS=number | ||
COPYRIGHT=string | ||
Compatibility=1.0|1.1 or later | 1.1 or later | |
Compiled file=path | if this is not specified then hhp stem.chm will be used | |
Contents file=path | ||
Create CHI file=bool | ||
Default Font=string, number, number | ||
Default Window=string | ||
Default topic=path | ||
Display compile notes=bool | ||
Display compile progress=bool | ||
Enhanced decompilation=bool | ||
Error log file=path | ||
Flat=bool | No | |
Full text search stop list file=path | ||
Full-text search=bool | Yes | |
IGNORE=string | ||
Index file=path | ||
Language=hex number string | ||
PREFIX=string | ||
Sample Staging Path=path | ||
Sample list file=path | ||
TMPDIR=string | ||
Title=string | ||
Custom tab="string", string | Can put multiple lines of this option to define more than one custom tab. | |
DBCS=??? | If you find any thing about this please tell us. | |
???=??? | If you find any more please tell us about them. |
[WINDOWS]
This is a variable=value section sorted by order of addition.
Each line has the following format:
string="string", "path", "path", "path", "path", "path", "string", "path", "string", number, number, [number, number, number, number], number, number, number, number, number, number, number
Argument number | Explanation |
0 | The window type. |
1 | The title bar text. |
2 | The TOC file. |
3 | The Index file. |
4 | The Default file. |
5 | The file shown when the Home button is pressed. |
6 | The file shown when the Jump 1 button is pressed. |
7 | The text of the Jump 1 button. |
8 | The file shown when the Jump 2 button is pressed. |
9 | The text of the Jump 2 button. |
10 | A bit feild of navigation pane styles. |
11 | Width of the navigation pane in pixels. |
12 | A bit field of the buttons to show. |
13 | Initial position of the window on the screen: [left, top, right, bottom]. |
14 | Style Flags. As set in the Win32 SetWindowLong & CreateWindow APIs. |
15 | Extended Style Flags. As set in the Win32 SetWindowLong & CreateWindowEx APIs. |
16 | Window show state. As set in the Win32 ShowWindow API. |
17 | Whether or not the navigation pane is initially closed. 1 = closed, 0 = open |
18 | The default navigation pane. 0 = TOC, 1 = Index, 2 = Search, 3 = Favorites, 4 = History (not implemented by HH), 5 = Author, 11-19 = Custom panes. |
19 | Where the navigation pane tabs should be. 0 = Top, 1 = Left, 2 = Bottom & anything else is invalid (I imagine 3 = Right). |
20 | ID to send in WM_NOTIFY messages. |
?? | HHW currently accepts only 21 arguments. If you find any more please tell us about them. |
Value | Explanation | Recommended setting |
0x00000002 | Hide/Show button hides/shows the navigation pane. | On |
0x00000004 | Back button. | On |
0x00000008 | Forward button. | On |
0x00000010 | Stop button. | On |
0x00000020 | Refresh button. | On |
0x00000040 | Home button. | On |
0x00000080 | Next button. Not implemented by HH. | Off |
0x00000100 | Previous button. Not implemented by HH. | Off |
0x00000200 | Notes button. Not implemented by HH. | Off |
0x00000400 | Contents button. Not implemented by HH. | Off |
0x00000800 | Locate button. Jumps to the current topic in the contents pane. | On |
0x00001000 | Options button. | On |
0x00002000 | Print button. | On |
0x00004000 | Index button. Not implemented by HH. | Off |
0x00008000 | Search button. Not implemented by HH. | Off |
0x00010000 | History button. Not implemented by HH. | Off |
0x00020000 | Favorites button. Not implemented by HH. | Off |
0x00040000 | Jump 1 button. Customisable text - Arg 7. | Either |
0x00080000 | Jump 2 button. Customisable text - Arg 9. | Either |
0x00100000 | Font button. Changes the size of the text shown in the IE HTML display pane. | On |
0x00200000 | Next button. Jumps to the next topic in the contents pane. Requires "Binary TOC=Yes". | On |
0x00400000 | Previous button. Jumps to the previous topic in the contents pane. Requires "Binary TOC=Yes". | On |
0x???00000 | The rest of the buttons either do nothing or are unknown. If you find out what others do please tell us. |
Value | Explanation | Recommended setting |
0x00000001 | Automatically hide/show tri-pane window: when the help window has focus the navigation pane is visible, otherwise it is hidden. | Off |
0x00000002 | Keep the help window on top. | Off |
0x00000004 | No title bar | Off |
0x00000008 | No default window styles (only HH_WINTYPE.dwStyles) | Either |
0x00000010 | No default extended window styles (only HH_WINTYPE.dwExStyles) | Either |
0x00000020 | Use a tri-pane window | On |
0x00000040 | No text on toolbar buttons | On |
0x00000080 | Post WM_QUIT message when window closes | Off |
0x00000100 | When the current topic changes automatically sync contents and index. | On |
0x00000200 | Send tracking notification messages | Off |
0x00000400 | Include search tab in navigation pane | On |
0x00000800 | Include history tab in navigation pane | Off |
0x00001000 | Include favorites tab in navigation pane | On |
0x00002000 | Put current HTML title in title bar | On |
0x00004000 | Only display the navigation window | Off |
0x00008000 | Don't display a toolbar | Off |
0x00010000 | MSDN Menu | Off |
0x00020000 | Advanced FTS UI. | On |
0x00040000 | After initial creation, user controls window size/position | On |
0x00080000 | Use custom tab #1 | Off |
0x00100000 | Use custom tab #2 | Off |
0x00200000 | Use custom tab #3 | Off |
0x00400000 | Use custom tab #4 | Off |
0x00800000 | Use custom tab #5 | Off |
0x01000000 | Use custom tab #6 | Off |
0x02000000 | Use custom tab #7 | Off |
0x04000000 | Use custom tab #8 | Off |
0x08000000 | Use custom tab #9 | Off |
0x10000000 | The window type has a margin | On |
0x?0000000 | The rest of the navigation pane styles either do nothing or are unknown. If you find out what others do please tell us. |
[MERGE FILES]
This is a list of CHMs to merge this one with. See the Merge Files feature in the Features list for more information. Help 2 will only use Collections to merge CHMs.
[FILES]
This is a list of files that should be compiled into the CHM by the compiler. Files linked to from the TOC or Index or other HTML files will also be compiled into the CHM. It is known that Help 2 will only compile files listed to be put in the CHM.
[TEXT POPUPS]
This is a list of text files and header files that contain the text for various popups that can be displayed using the Popup command of the HH ActiveX control.
[INFOTYPES]
It is unknown how this section is formatted since the current version of HHW refuses to output anything in this section. I guess that the help viewer doesn't yet implement this feature. If you find a past or future version that does output this section please let us know.
[MAP]
Each line has the following format:
#define string number
or
#include path
[ALIAS]
This is a variable=value section sorted by the numerical value of the variable.
Each line has the following format:
number|string=path ; This is a comment
or
#include path
[SUBSETS]
It is unknown how this section is formatted since the current version of HHW refuses to output this section. I guess that the help viewer doesn't yet implement this feature. If you find a past or future version that does output this section please let us know.