Omni Systems, Inc. Mif2Go User's Guide, Version 55

<< Prev | Next >>

> 9 Generating Microsoft HTML Help > 9.12 Setting up CSH for HTML Help > 9.12.3 Specifying and generating a map file for CSH links

### 9.12.3 Specifying and generating a map file for CSH links

If the developers of the application for which you are providing context-sensitive help use HH_HELP_CONTEXT and specify topics by ID number, ask them for the file that maps symbolic IDs to numeric IDs. (You cannot go directly from numbers to files; you have to go through the symbolic names used in the map and alias files.) For C or C++, the map file is usually named resource.h, and contains entries such as the following:

#define IDH_Export 1090

#define IDH_CnvDsgnr 1080

The map file must be named in the [MAP] section of your .hhp file, and must be located in or below the directory that contains your .hhp file. For example:

[MAP]

#include "resource.h"

Quotes are required around each #included file name.

Instead of editing the [MAP] section of your .hhp file, you can specify the file name in a configuration setting; and you can have Mif2Go generate an initial map file for you.

Specify a map file

To specify the name of the map file:

[MSHtmlHelpOptions]

; CshMapFile = name of file to #include in .hhp [MAP] for CSH support

CshMapFile = resource.h

This way you will not lose the information if Mif2Go rewrites the .hhp file. However, if you need to reference more than one map file, you must specify any additional map files in the .hhp file, and you must prevent Mif2Go from rewriting the .hhp file. See §9.3.9 Regenerating the HTML Help project file.

Generate a map file

While the map file normally comes from the developers, it might be necessary for the writer to produce the first one, to let the developer know what IDs are available.

To have Mif2Go generate a map file for CSH links:

[MSHtmlHelpOptions]

; MakeCshMapFile = No (default) or Yes (generate a map file)

MakeCshMapFile = Yes

; CshMapFileNumStart = Starting number for numeric IDs, default 10000

CshMapFileNumStart = 10000

; CshMapFileNumIncrement = Increment between values, default 10

CshMapFileNumIncrement = 10

Mif2Go creates a map file of the name you assign to CshMapFile, overwriting any existing file of the same name, and assigning an incremental numeric ID to each of the symbolic IDs included in your document.