Solved

HTML-Help and Visual Basic

Posted on 1998-06-12
2
216 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:sgroner
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:sgroner
ID: 1463215
Thanks alot.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now