.HHP File Sections


The MS HTML Help 1.x Project file (.HHP) is basically an INI file containing several sections which define the help project. MS have not published much documentation on the .HHP file format (what there is you will find in the Workshop on-line help), however web sites such as Bonedaddy.net do a great job of scavenging around and documenting the various settings. Many of the settings are defined in the htmlhelp.h C++ header file.

HTML Help Workshop is used for creating both CHM help files and the older MSDN Collections. There are many settings which are incomplete or which are used solely for the creation of MSDN Collections, and do not concern us. The tables below lists the core settings important to us for the creation of MS HTML Help 1.x .CHM files.


Main project settings. You do not need to learn these settings as FAR Project Editor sets these for you.

Binary TOC=No Set "Yes" for older MSDN/VS6 Collections and big TOCs. Must be set "No" for Merge, Info Types, Custom Icon and other HTML Help features to work. Default value = No.
Binary Index=Yes Similarly must be Yes for some HTML Help features to work. Default value = Yes.
CompiledFile=Outfile.chm Name of compiled .CHM output file name.
ContentsFile=Toc.hhc Name of Table Of Contents file. Leave blank for no Contents tab.
IndexFile=Index.hhk Name of K (visible) Index file. Leave blank for no Index tab.
AutoIndex=No Set "Yes" to add Keywords embedded in Topic files into the K Index file. Default = No.
DefaultWindow=WinDef Name of default Window Definition. Win defs are defined in the [Windows] section.
DefaultTopic=Index.htm Default topic to open when CHM is opened.
DefaultFont=Georgia,8,0 Leave Blank for default -- FontName,FontPtSize,CharSet.
Language=0x409 English (US) Important to set this correctly since HH 1.x is an ANSI application and must know the correct language, Font, Charset etc to use when sorting index entries and displaying text.
Title=My Online Help Window title text.
CreateCHIFile=No Not required by HH 1.x. Used by MSDN collections. Contains cached index information.
Compatibility=1.1 |1.0|1.1 or later|
ErrorLogFile=Compiler.Log Compiler output log file.
Full-text search=Yes Normally we want to generate search data.
Display compile progress=Yes Set "Yes" to see the files listed in the compiler log output.
Display compile note=Yes Seems to do nothing. Possibly never fully implemented by MS.
Flat=No Set Yes to store all files to the root directory in the CHM file instead of in folders.
Full text search stop list file=path Points to a file containing a list of Stop words. This is been problematic in the past and not supported by FAR. However you still include it using a text editor. The Word file is simply a text file containing a word on each line. These words will be excluded from Full-text search.

Defines each help window's attributes. EG. You could define a small help window with no toolbar or navigation tabs, and another with the works. You do not need to learn these settings as FAR Project Editor sets these for you.


TP="Title","toc.hhc","index.hhk","default.htm", "home.htm" ,"Jump1.htm","Jump1Text","Jump2.htm","Jump2Text",0x63520,222,0x7c387e,

WinName Each window definition needs a name.
Caption Window title text.
TocFile HHC Table Of Contents file to use. Leave blank for no Contents tab.
IndexFile HHK Index file to use. Leave blank for no Index tab.
DefaultFile Default topic to display when the window opens.
HomePage Topic to display when the Home toolbar button is pressed.
Jump1Url, Jump1Text Display a custom toolbar button and text. Icon is preset.
Jump2Url, Jump2Text Display a second custom toolbar button and text. Icon is preset.
WinProperties Bit field of window properties. EG. 0x7c387e - HHWIN_PROP_.. (see htmlhelp.h)
NavWidth Nave Pane width - Decimal number not Hex.
ToolBarBtns Bit field of toolbar buttons. EG. 0x7c387e -- HHWIN_BUTTON_... (see htmlhelp.h)
WinPos Initial position of the window EG. [0,0,16,16], = [left, top, right, bottom]
WinStyles Window creation styles. Typically 0xb0000 or empty string.
WinExtStyles Extended Style Flags. Default = empty string
ShowState Window show state.
AdvOptions Navigation pane initially open 0 or closed 1.
DefaultTab Default Navigation tab. Default = 0. HHWIN_NAVTYPE_... (see htmlhelp.h)
TabPos Navigation tabs position. HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, ... (see htmlhelp.h)

Used if you are merging two or more CHM help files together. Lists all CHMs which will merge into this CHM..



The Map and Alias sections must be set if you want to create a Context ID to URL mapping. Used when the application opens help using the HH_HELP_CONTEXT help command. ie. For opening help using an HelpContext / integer ID.

EG. HtmlHelp(0, "c:\app\help\Help.chm", HH_HELP_CONTEXT, 1001);

The [MAP] section defines the IDs.
The [ALIAS] section defines the mapping between ID and help topic.

Example MAP and ALIAS section


#define IDH_HomePage 1000     ;comment
#define IDH_TestTopic1 1001
#define IDH_TestTopic2 1002

Example MAP and ALIAS section using #include statements

;Use the #include statement to include an external header file at compile time.

#include myhelp.ali

#include myhelp.h

where myhelp.ali is a text file containing


and myhelp.h is a text file containing

   #define IDH_HomePage 1000
   #define IDH_TestTopic1 1001
   #define IDH_TestTopic2 1002


This style of popup is quite fiddly to setup and has fallen out of favor. Most authors now use either the hhctrl.ocx TextPopup command or the free KeyWorks ActiveX KeyHelp popup. Here is the TextPopup command (see Workshop help for more).

<A HREF="JavaScript:hhctrlID.TextPopup(text_variable, font_variable,9,9,-1,-1)">Click Here</a>

You can find help on both the [Text Popups] section and the TextPopup command in the MS HH Workshop on-line help. Search for
"[TEXT POPUPS]" (with quotes).


InfoTypes and Subsets where never really completed by Microsoft. There is some info in Workshop help on them. Basically they allow you to setup filters where switching between different filters changes the items displayed in the TOC/Index/Search.

Again if you really need this stuff then have a look at the free KeyWorks ActiveX control called KeyHelp. KeyHelp is written by Ralph Walden (x-Microsoft) who had a lot to do with the creation of WinHelp and HTML Help.