Solved

HTML-Help and Visual Basic

Posted on 1998-06-12
2
213 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

19 Experts available now in Live!

Get 1:1 Help Now