Microsoft HTML Help Workshop (HHW)User Documentation Support for Desktop ApplicationsNov 27, 2008 Harry P. Schlanger
HHW is a free documentation project for producing an external Help module, which can be called from the main program application or from any MS Office product.
Microsoft HTML Help Workshop is an Integrated Development Environment (IDE) tool, in which a number of web pages are used to describe the main application and “compiled” into a working external program. These linked pages must first be created in any familiar HTML software of choice, such as FrontPage or Dreamweaver and imported into HHW. The HHW project IDE is available for free from Microsoft. A tutorial is available by Char James-Tanny. The HHW Interface Microsoft HTML Help Workshop produces desktop or online documentation in a specific format. A sample Help module is shown in Figure 1. It has a tree structure menu on the left side and a right window to display HTML content. Figure 2 is a screen shot of the HHW project interface. It has a left window for displaying information as indicated by the three tabs (shown in red):
The right window displays details of the left window contents. The developer enters the project environment variables, including project name, etc. Content is then added by defining the location of HTML files that will appear in the right view window. Last, an index and search facility can be set up for searching the help files.
Compiling the Help Executable The help module that HHW produces is a compiled executable that can be called in code from a main program such as VB.Net. The help module can also be called using VBA from any Microsoft Office product, such as Word, Excel, etc. Just beneath the "Test" menu is an icon that resembles a meat grinder. Clicking on this button begins compilation of the help file with instructive messages appearing in the right window. Calling Help from the Main Application In VB or VB.Net, a single line of code is required to call a help executable, named MyHelp.chm: Call Shell("hh.exe " & "c:\MyHelp", AppWinStyle.NormalFocus) As an example to call Help from an MS Office 2007 product such as Excel, follow these steps:
Once this is done, inside the Visual Basic Module, copy and paste the following code to replace the existing empty subroutine: Public Const HH_HELP_CONTEXT = &HF Public Const HH_DISPLAY_TOPIC = &H0 Public Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _ (ByVal lhwndCaller As Long, ByVal sFileName As String, _ ByVal lCommand As Long, ByVal lData As Any) As Long Sub Button1_Click() Call HtmlHelp(0, ThisWorkbook.Path & "\MyHelp.chm", HH_DISPLAY_TOPIC, "My First HHW") End Sub After the code is pasted, simply change the file name MyHelp.chm to a more convenient name. SummaryMicrosoft HTML Help Workshop is a user-friendly, attractive interface for producing a Help executable for desktop applications. It works by first producing the HTML pages, importing them into the project and compiling as a single file. Help can then be called by code from the main application or downloaded from the internet as an activeX object.
The copyright of the article Microsoft HTML Help Workshop (HHW) in Computer Programming is owned by Harry P. Schlanger. Permission to republish Microsoft HTML Help Workshop (HHW) in print or online must be granted by the author in writing.
Related Topics
Reference
More in Technology
|