Delphi Components - Using the Microsoft Help Workshop
Borland distributes the Microsoft Help Workshop with its compilers.
It is used to convert one or more *.rtf files into a single *.hlp file.
Running Help Workshop
| Compiling an *.rtf File
| General Notes
| User Interface Configuration
Related pages
Writing Help Files
| Style_Guide
| Table of Contents
| MS Help Workshop
| Checklist
| More Tips
Running the Microsoft Help Workshop
The Delphi 5 help simply says to use the Microsoft Help Workshop
to create help.
It is located at
C:\Program Files\BORLAND\Delphi5\Help\Tools\hcw.exe
(Note: The Workshop provided with Delphi 5 (Hwc & HcRtf versions 4.03.0002)
is able to compile an rtf file produced with Word 97,
the version supplied with Borland C++ 5 (Hwc version 4.01.0950,
HcRtf version 4.01.0951)
only produces errors.)
In order to access the workshop, I suggest adding it to the Tools menu.
In Delphi 5, select
Tools / Configure Tools...
Select Add,
Browse for hcw.exe, and
give it a title of Help Workshop (Compiler).
Notes:
- You can compile *.rtf files while they are still open in Word
- In the Help Workshop, be sure File / Help Author is checked.
This allows you to right click any help page
(not just yours) and get Topic Information.
- By default, the hlp file (compiled output) is located in the same directory as the
hpj file (help project definition).
- Under File / Compile...,
check Automatically display Help file in WinHelp when done
- Be sure to read the Help Workshop tips, most of that data
is hard to find in the help file.
- The Help Workshop help on footnotes and macros (ALink) is very good.
However, the examples are in RTF not MS Word - some translation is required.
Compiling an *.rtf File
To use the Help Workshop, you need to create an *.hpj (Help Project) file.
From the menu, select
File / New... / Help Project
All you need to add is a link to an *.rtf file and compile.
But, to make it look like the Delphi help, you need to define
a few windows
and enable the browse button. You can do all of this via the workshop,
but its a lot of work.
It is much easier if you just copy an existing *.hpj file,
open it in notepad, and change the paths to whatever you want.
(You can have as many *.rtf files as you want.)
This is one of the files I use ... Uh, just ignore the warning not to modify the file
(I do :)
; This file is maintained by HCW. Do not modify this file directly.
[OPTIONS]
LCID=0x409 0x0 0x0 ; English (United States)
REPORT=Yes
TITLE=MicroCline File IO
BMROOT=e:\DelphiProjects\CommonHelpFiles
HLP=mcFile_IO.hlp
[FILES]
e:\DelphiProjects\Project_1\help\Project_1.rtf
e:\DelphiProjects\Project_2\help\Project_2.rtf
[WINDOWS]
main="",,28676,,,f2
example="Example",(360,160,640,320),12292,(r14876671),(r8454143),f2
pme="",(40,320,280,640),4,(r14876671),(r12632256)
proc="",(425,100,578,300),12292,,,f2
gloss="",(425,100,578,300),12292,,(r12632256),f2
(w95sec)="",(425,100,578,300),12292,,(r12632256),f2
[CONFIG]
BrowseButtons()
BMROOT is where your
pme bitmaps are stored (protected, published, read-only).
The bitmaps are available in
CommonHelpFiles.zip.
General Notes
-
When a Contents file (*.cnt) is used, be sure that the base file
is the same as the Help file (*.hlp).
I made the mistake of renaming the hlp and cnt files without changing
:Base filename
It took several hours to find the problem.
You can write the compiled help file anywhere you want
by entering the drive letter and path in
the project file under
Options... / Files / Help File
I prefer to edit the *.hpj file in notepad.
The output *.hlp filename is always all upper case.
User Interface Configuration
When creating help files, you are going to have to re-compile them many times.
This is how to do that with a single button click.
- When you open an *.hpj file, there are 3 way to compile it -
via File / Compile, via the Compile button on the toolbar,
via the Save and Compile button in the window.
The Save and Compile button requires only one mouse click,
the other methods require more.
- Make sure that the Help Workshop sub-windows are not maximized.
- Arrange the windows so that you can see if there are any errors or warnings,
and so that you can click the Save and Compile Button.
- Be sure that
Automatically display Help file in WinHelp when done
is enabled (available via the other compile methods).
Author: Robert Clemenzi -
clemenzi@cpcug.org