HOWTO: Set Up Visual C++ to Use the HTML Help API

ID: Q186907


The information in this article applies to:
  • Microsoft Visual C++, 32-bit Editions, versions 4.2, 4.2b, 5.0, 6.0
  • Microsoft HTML Help, versions 1.3, 1.21


SUMMARY

This article describes the steps that must be performed in order to use the HTML Help API with Visual C++.


MORE INFORMATION

  1. Include Htmlhelp.h in any source file that uses the HTML Help API. Add Htmlhelp.h to the .cpp file where the HTML Help API is invoked or in the include file for that .cpp file.


  2. Show Visual C++ where to find Htmlhelp.h; it is installed with the HTML Help Workshop in the <HTML Help Workshop Path>\Include directory. Specify this location for Visual C++ as follows:

    1. On the Tools menu, click Options.


    2. In the Options dialog box, click the Directories tab.


    3. In the Show Directories For list, click Include Files.


    4. Type the location of the HTML Help Workshop's include directory in the Directories box.




  3. Make sure you use Htmlhelp.lib when linking.


  4. Show Visual C++ where to find the HTML Help library, located in the <HTML Help Workshop Path>\lib. Specify this location in Visual C++ by returning to the Directories tab described in step 2:

    1. In the Show Directories For list, click Library Files.


    2. Type the location of the HTML Help Workshop's library directory in the Directories box.




  5. Next, add the chosen library to the Visual C++ project settings, as follows:

    1. On the Project menu, click Settings.


    2. After the Settings dialog box appears, click the Link tab.


    3. Select General in the Category list, and then type the name of the Html Help library in the Object/Library Modules box.




  6. When building the project, the following warning message may appear:
    ..default lib LIBCMT conflicts with use of other libs; use /NODEFAULTLIB:library.
    Follow the procedure in step 5 to return to the Link tab in the Settings dialog box:

    1. In the Category list, click Input.


    2. Then type LIBCMT in the Ignore Libraries box.


    This method disables the default library search, so if any of the default libraries are being used, they must now be explicitly listed.


The Visual C++ project can now call the HTML Help API successfully.


REFERENCES

HTML Help Workshop: Online Help HTML Help Web Site:

hhttp://msdn.microsoft.com/workshop/Author/htmlhelp/
"Official Microsoft HTML Help Authoring Kit" by Steve Wexler, Microsoft Press

Additional query words:

Keywords : kbide kbVC420 kbVC500 kbVC600 kbDSupport kbGrpDSTools kbHTMLHelp121 kbHTMLHelp130 kbvc600faq
Version : WINDOWS:1.21,1.3; winnt:4.2,4.2b,5.0,6.0
Platform : WINDOWS winnt
Issue type : kbhowto


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.