Call HtmlHelpTag(s): WinAPI/Registry


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.chm
uCommand usually is 0 or 1
dwData 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)

blog comments powered by Disqus