JBush
May 24th, 2001, 01:31 PM
I have created a html help file using HTML Help Workshop. By just running the chm file it runs great. When I call it from my VB code, I use the API function HTMLHelp.
When I call my Help function, I pass my helpcontextID. It gives me the error HH_HELP_CONTEXT called without a map section. In HTML Help Workshop I have set all my aliases. I don't understand why it does this? Does anyone have an answer?????
HERE is the code that I am using
Const HH_DISPLAY_TOPIC = &H0
Const HH_HELP_CONTEXT = &HF
Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
dwData As Any) As Long
Private Sub Help(Optional context As Integer = 10)
'the loads the help file
Dim i As Long
If context = 0 Then
i = HtmlHelp(0, App.HelpFile, HH_DISPLAY_TOPIC, 0)
Else
i = HtmlHelp(0, App.HelpFile, HH_HELP_CONTEXT, context)
End If
End Sub
When I call my Help function, I pass my helpcontextID. It gives me the error HH_HELP_CONTEXT called without a map section. In HTML Help Workshop I have set all my aliases. I don't understand why it does this? Does anyone have an answer?????
HERE is the code that I am using
Const HH_DISPLAY_TOPIC = &H0
Const HH_HELP_CONTEXT = &HF
Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
dwData As Any) As Long
Private Sub Help(Optional context As Integer = 10)
'the loads the help file
Dim i As Long
If context = 0 Then
i = HtmlHelp(0, App.HelpFile, HH_DISPLAY_TOPIC, 0)
Else
i = HtmlHelp(0, App.HelpFile, HH_HELP_CONTEXT, context)
End If
End Sub