Thursday, December 4, 2008

Call HtmlHelp

Declare the following external function
FUNCTION long HtmlHelp(long hwnd, string pszFile, &
long uCommand, long dwData) LIBRARY "hhctrl.ocx" &
ALIAS FOR "HtmlHelpA"

hwnd is the handle of calling window (you may set it using handle(this)function)pszFile is the name of help file eg. myApp.chmuCommand usually is 0 or 1dwData is the "numeric" topic (for example, 1005).
NOTE: the hhctrl.ocx must be registered in your system. If you have IE4 installed, it's done already.
To display the HTMLHelp with left panel showing the Table of Content Tab and the right panel the first Help page
HtmlHelp( ll_handlewindow, ls_helpfile + ' > main', 0, 0)
To display the HTMLHelp with left panel showing the Search Tab and the right panel the first Help page
string nullstring
SetNull(nullstring)
HtmlHelp( ll_handlewindow, ls_helpfile + ' > main', 1, nullstring)
To display the HTMLHelp for a specific topic (no left panel).
CONSTANT long HH_HELP_CONTEXT = 15
HtmlHelp( ll_handlewindow, ls_helpfile , HH_HELP_CONTEXT, 1005)

No comments:

Custom Search