To add a custom build rule to build the latest version of the .chm
Add the HTML Help Project file (.hhp) to a Visual C++ project. From the Project menu, click Add To Project, then choose Files options to access the Insert Files into Project dialog box.
1.Select Settings… from the Project menu to access the Project Settings dialog box.
2.Select the .hhp file in the Settings For: list and click the Custom Build tab.
The Commands entry for the build rule should resemble:
You may need to specify absolute or relative paths to the hhc.exe and .hhp file. You can put hhc.exe in your project's search path:
Select Options… from the Tools menu.
Click on the Directories tab and select Executable files from the Show directories for: list.
Specify the directory containing the hhc.exe file in the Directories list.
The Outputs entry should resemble:
You may have to specify an absolute or relative path to ensure that the output file is written to the desired location.
If you want to rebuild the .chm file after a .htm file changes but where the .chm file wa not rebuilt, you should click the Dependencies... button in the Project Settings dialog box and specify each .htm file, including the path if necessary, to your HTML Help project.