CSH Calls for HTML Help

Information for Developers

Use the following information to connect Microsoft HTML Help to an application.

  • Use the following syntax to call a topic using a map number:

    Copy
    HWND HtmlHelp(Window(), "c:\path\MyHelp.chm", HH_HELP_CONTEXT, Number);
  • Use the following syntax to call a topic using a file name:

    Copy
    HWND HtmlHelp (Window(), "c:\path\MyHelp.chm", HH_DISPLAY_TOPIC, "welcome.htm");

To hook context-sensitive Help (CSH) to an application, the code looks something like this:

Copy
HtmlHelp(hWnd, /*Window handle of program or dialog*/ 
"CSHHelp.chm", /*Name of the CHM file*/ 
HH_HELP_CONTEXT, 
dwMapNumber); /*Number from header file*/

Element

Description

HtmlHelp(hWnd

This is the window handle of a program or dialog. A window handle helps identify a window so the HTML Help engine knows which application is performing the specific action.

MyHelp.chm

This is the name of a compiled HTML Help file (CHM) that includes the CSH. The actual name of the CHM file is determined by the Help author.

HH_HELP_CONTEXT

This is the command sent to the HTML Help engine for window-level Help.

dwMapNumber)

A map number from the header file.