Help - Search - Members - Calendar
Full Version: HTML Help problem with MS Access
HTMLHelp Forums > Programming > Databases
kmuntz
I have converted WinHelp for my Access app to HTML help (using a tool called HelpScribble) so that my app can run under Vista. The help file opens perfectly independently of Access, so it looks like nothing is wrong with the help file itself, but when i try to open it from within Access using the functions below, only the left-hand pane shows correctly - the right-hand content pane displays "Navigation to the webpage was canceled". This is also true when trying to display any topic on the left-hand side.

Here is the code I used:
Private Const HH_DISPLAY_TOC = &H1
Private Const HH_DISPLAY_INDEX = &H2
Private Const HH_DISPLAY_SEARCH = &H3
' UDT for accessing the Search tab
Private Type tagHH_FTS_QUERY
cbStruct As Long
fUniCodeStrings As Long
pszSearchQuery As String
iProximity As Long
fStemmedSearch As Long
fTitleOnly As Long
fExecute As Long
pszWindow As String
End Type
Private Declare Function HTMLHelpStdCall Lib "hhctrl.ocx" _
Alias "HtmlHelpA" (ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByVal dwData As Long) As Long
Private Declare Function HTMLHelpCallSearch Lib "hhctrl.ocx" _
Alias "HtmlHelpA" (ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByRef dwData As tagHH_FTS_QUERY) As Long

Public Function ShowContents() As Long
ShowContents = HTMLHelpStdCall(0, pstrAppProgPath & "MediWiz.chm", HH_DISPLAY_TOC, 0)
End Function

Public Function ShowIndex() As Long
ShowIndex = HTMLHelpStdCall(0, pstrAppProgPath & "MediWiz.chm", HH_DISPLAY_INDEX, 0)
End Function

Public Function ShowSearch() As Long
Dim HH_FTS_QUERY As tagHH_FTS_QUERY
With HH_FTS_QUERY
.cbStruct = Len(HH_FTS_QUERY)
.fUniCodeStrings = 0&
.pszSearchQuery = ""
.iProximity = 0&
.fStemmedSearch = 0&
.fTitleOnly = 0&
.fExecute = 1&
.pszWindow = ""
End With
ShowSearch = HTMLHelpCallSearch(0, pstrAppProgPath & "MediWiz.chm", HH_DISPLAY_SEARCH, HH_FTS_QUERY)
End Function
Darin McGrew
This forum is about help for people writing HTML documents for the web. It isn't about the MS HTMLHelp product. Sorry.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.