The final step is to create a Help project file that allows you to compile the map file(s) and topic files into one binary Help file. At a minimum, the steps you need to perform include:
- For HTML Help, you need to create a .hhp project file, add your .htm files with the content, add the .h file with the ID numbers, add your .h file with the aliases, define a default window type, and then save and compile the help project.
Creating and Compiling a Simple Help Project
To create and
compile the project file in Winhelp:
- In Microsoft Help Workshop, from the File menu, click New. The New dialog box appears.
- Select Help Project and click OK. The Project Name dialog box appears.
- Type or browse for a path location, and enter a file name. Remember to use the same Help file name that you specified in the picture's Properties dialog box.
- Click Save.
- Click the Options button. The Options dialog box appears.
- Select the General tab, and then, in the Help Title field, enter the name you want to appear in the title bar of your Help system.
- Select the Files tab and click Change. The Topic Files dialog box appears.
- Click the Add button and browse for the .rtf file that includes your Help topics. Click OK when you are complete.
- From the Options dialog box, click OK.
- Click the Map button. The Map dialog box appears.
- Click Include. The Include File dialog box appears.
- Browse and select the header file that includes all of your map statements. Click OK to exit the Include File dialog box, and click OK again to save your changes to the Map dialog box.
- When you are ready to compile, click the Save and Compile button.
To create and
compile the project file in HTML Help:
- In the Microsoft HTML Help Workshop, from the File menu, click New. The New dialog box appears.
- In the list box, select Project and click OK. The New Project wizard appears.
- Leave the Convert Winhelp Project check box cleared, and click Next. The New Project - Destination screen appears in the wizard.
- In the edit box, enter the location and name that you want your Help project to use. Remember to use the same Help file name that you specified in the picture's Properties dialog box.
- Click Next. The New Project - Existing Files screen appears in the wizard.
- Select the HTML Files (.htm) check box, and click Next. The New Project - HTML Files screen appears in the wizard.
- Click Add. The Open dialog box appears.
- Browse to and select the HTML file(s) that you want to add to your project and click Open to return to the New Project - HTML Files screen.
- Click Next. The New Project - Finish screen appears in the wizard.
- Click Finish.
- Click the HTML Help API Information button (the fourth button down, on the Project tab). The HTML Help API Information dialog box appears.
- From the Map tab, click the Header File button. The Include File dialog box appears.
- Enter or browse to select the path and file name of your .h file.
- Click OK.
- Click the Alias tab, and then click the Include button. The Include File dialog box appears.
- Enter or browse to select the path and file name of your .ali file.
- Click OK, and then click OK again to close and save the information in the HTML Help API Information dialog box. After you do that, you will notice two new sections in your help project: [ALIAS] and [MAP].
- Click the Add/Modify Window Definitions button (the third button down, on the Project tab). The Add a New Window Type dialog box appears.
- Enter a name for your default window. For example, you may want to create a window named main. After you do that, click OK. The Window Types dialog box appears.
- Click the Position tab, and then click the Autosizer button. The Autosizer dialog box appears.
- Drag the dialog box and its corners until the box appears where you want topics to display on your screen, by default, and click OK.
- On the Window Types dialog box, click OK.
- Click the Save All Files and Compile button (the bottom button on the Project tab).
How to Compile from a Command Line
As an alternative, you can also build and compile a Help system from the command line. If you are building more complex help systems, you may find the command line options helpful.
Use these steps if you already created a .hpj or .hhp file and just want to build and compile an updated version. From the DOS prompt or from within a batch file, use the following commands to build and compile your help:
To build and
compile Winhelp from the command line:
Type this command to build and compile a help file:
hcrtf -xn "C:\MyFolder\ProjectName.hpj"
In this example, replace C:\Myfolder with the path of your Help project and replace ProjectName.hpj with the name of your help project. The -xn option, in this example, builds the help file without displaying the Help Workshop window. Refer to the Microsoft Help Workshop online Help for detailed information on command-lines and options.
To build and
compile HTML Help from the command line:
Type this command to build and compile a help file:
hhc "C:\MyFolder\ProjectName.hhp"
In this example, replace C:\Myfolder with the path of your Help project and replace ProjectName.hhp with the name of your help project. Refer to the Microsoft HTML Help Workshop online Help for detailed information on command-lines and options.