Solved

HTML-Help and Visual Basic

Posted on 1998-06-12
2
225 Views
Last Modified: 2013-11-25
Where can I get some information on how to integrate HTML-Help into my VB5 Application.  If you have some information please send provide it here, also does it work the same way the WINHelp works.  does the F1 Key call HTML-Help instead, I am confused.  The documentation with the Microsoft HTML Help Workshop does not specify how to integrate it into your program.

Thanks.
0
Comment
Question by:Steve Groner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
yowkee earned 50 total points
ID: 1463214
sgroner,

  You could getting some info from following site:
http://www.microsoft.com/workshop/author/htmlhelp/default.asp
http://www.helpmaster.com/htmlhelp/htmlhelp.htm

  After you have download MS Html Help workshop, create a .hhp project, follow the step to create your help file, and finally compile to a .chm file(a compressed file of html files).

  For calling the html help file from your VB application. You must use API "HtmlHelpA" to call the html help file. There is a file hhctrl.ocx stay in your windows system directory after you install MS html help workshop, and it contains the required API to call html help file.

-----
For example:
' Your html help project create a file "test.chm"

Private Declare Function HtmlHelp Lib "hhctrl.ocx" _
    Alias "HtmlHelpA" _
    (ByVal hwndCaller As Long, _
     ByVal pszFile As String, _
     ByVal uCommand As Long, _
     ByVal dwData As Long) As Long
 
Private Sub Command1_Click()
    Call HtmlHelp(Me.hWnd, "test.chm" + vbNullChar, 0, 0)
End Sub
-----

The pszFile parameter required a string which terminated with null, that's why I put "test.chm" + vbNullChar.

You could also implement context help which is similiar to windows help file. What you need is passing different value to 3rd parameter(uCommand) of HtmlHelp API. You could find the info you need in the help of MS html help workshop. It is under category HTML Help Reference--> Htmlhelp API Reference. For getting all the value of the constants you find in the help, look for a file HtmlHelp.h which under directory "xxx\HTML Help Workshop\include\".

I list out some of the constants here:
---
Const HH_DISPLAY_TOPIC = 0
Const HH_HELP_FINDER = 0             ' WinHelp equivalent
Const HH_DISPLAY_TOC = 1             ' not currently implemented
Const HH_DISPLAY_INDEX = 2           ' not currently implemented
Const HH_DISPLAY_SEARCH = 3          ' not currently implemented
Const HH_SET_WIN_TYPE = 4
Const HH_GET_WIN_TYPE = 5
Const HH_GET_WIN_HANDLE = 6
Const HH_ENUM_INFO_TYPE = 7          ' Get Info type name, call repeatedly to enumerate, -1 at end
Const HH_SET_INFO_TYPE = 8           ' Add Info type to filter.
Const HH_SYNC = 9
Const HH_ADD_NAV_UI = &HA              ' not currently implemented
Const HH_ADD_BUTTON = &HB              ' not currently implemented
Const HH_GETBROWSER_APP = &HC          ' not currently implemented
Const HH_KEYWORD_LOOKUP = &HD
Const HH_DISPLAY_TEXT_POPUP = &HE      ' display string resource id or text in a popup window
Const HH_HELP_CONTEXT = &HF            ' display mapped numeric value in dwData
Const HH_TP_HELP_CONTEXTMENU = &H10    ' text popup help, same as WinHelp HELP_CONTEXTMENU
Const HH_TP_HELP_WM_HELP = &H11        ' text popup help, same as WinHelp HELP_WM_HELP
Const HH_CLOSE_ALL = &H12              ' close all windows opened directly or indirectly by the caller
Const HH_ALINK_LOOKUP = &H13           ' ALink version of HH_KEYWORD_LOOKUP
Const HH_GET_LAST_ERROR = &H14         ' not currently implemented ' See HHERROR.h
Const HH_ENUM_CATEGORY = &H15          ' Get category name, call repeatedly to enumerate, -1 at end
Const HH_ENUM_CATEGORY_IT = &H16       ' Get category info type members, call repeatedly to enumerate, -1 at end
Const HH_RESET_IT_FILTER = &H17        ' Clear the info type filter of all info types.
Const HH_SET_INCLUSIVE_FILTER = &H18   ' set inclusive filtering method for untyped topics to be included in display
Const HH_SET_EXCLUSIVE_FILTER = &H19   ' set exclusive filtering method for untyped topics to be excluded from display
Const HH_SET_GUID = &H1A               ' For Microsoft Installer -- dwData is a pointer to the GUID string

------

Regards.
0
 
LVL 1

Author Comment

by:Steve Groner
ID: 1463215
Thanks alot.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question