You may want users to be able to access some topics directly from the program instead of from the contents. For example, you could create a topic that describes a dialog box, then have the application display that topic when the user taps the question-mark button in the dialog box.
To call Help from an application, use the CreateProcess function. For the second argument, pass a command line parameter, using the TEXT macro to convert the string to Unicode, that contains the file name of the contents or specific Help topic to display. All other arguments are NULL or FALSE. For example:
CreateProcess(TEXT("PegHelp.exe"), TEXT("my_topic3.htp"),NULL, NULL, FALSE, 0, NULL, NULL, NULL, NULL);
-or-
CreateProcess(TEXT("PegHelp.exe"), TEXT("My Help Contents.htc"),NULL, NULL, FALSE, 0, NULL, NULL, NULL, NULL);