' HTML Help file launched in response to a button click:
Private Sub HH_DISPLAY_Click()
'hWnd is a Long defined elsewhere to be the window handle
'that will be the parent to the help window.
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_DISPLAY_TOPIC, 0)
End Sub
' A specific topic identified by the variable ContextID is launched
' in response to this button click:
Private Sub HH_HELP_Click()
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_HELP_CONTEXT, ContextID)
End Sub