The Delphi HH Kit

| Delphi HH Kit | C++ Builder HH Kit | OnHelp Event Fix | Documentation | Delphi Code Examples | Download |

Last update: 01-Jan-2009

Delphi HH Kit

The Delphi HH Kit is a free download for Delphi 2/3/4/5/6/7/etc.  It consists of 2 units & doc file. The first unit is a port of C++ header file "HtmlHelp.h". The second is a library of HTML help related functions "hh_funcs.pas". We also provide a suite of advanced HH Code Examples (see below).

Don't forget to checkout our shareware product FAR HTML. The easy way to create HTML Help 1.x and MS Hep 2.x help files.

  • Read the Kit Documentation and Change Notes
  • Download "The Kit" version 2.1"  - Size: 32KB, 3-Dec-2009
    - Unicode version now compatible with Delphi 6/7/ .. Delphi 2010.
    - HH_Funcs.pas utility now compiles under D2010. Ansi and Unicode versions of funcs.
    - HH.pas - HTMLHelp()  function defaults to either Ansi or Unicode depending on the version of Delphi.
  • Download "The Kit" version 1.09"  - Size: 32KB, 27-Aug-2008
    - Ansi version for Delphi 2/3/4/5/6/..
    - Fix bug with Windows Vista compatibility.
    - Updated D6OnHelpFix.pas to fix small memory leak on shutdown.

Update for Delphi 2009, Delphi 2010  [3-Dec-2010]

All the basics are in the HH Kit above. Make sure you grab version 2.1 if you use Unicode Delphi 2009 or greater. Remember that in Delphi 2006 and above (I think) the system file Windows.pas now defines the HtmlHelp() API function for you. So consider using that if all you just need to launch help.

The suite of code examples (see below) are compatible with Delphi 2/3/4/5/6.. 2009/2010. These can be downloaded from the HH Kit Yahoo group Files area.

C++ Builder HH Kit

btn_jedinow.gif (3350 bytes)Marcel van Brakel has begun the work of converting the Delphi HH Kit, into C++Builder for Project Jedi.

You can download Marcel's C++Builder HH Example code from the download page.

 D6OnHelpFix.pas - OnHelp Event Fix for Delphi 6/7/8/.. & C++ Builder 6/..

Important:

Delphi 6 and above broke the OnHelp event which we rely on to override the Delphi WinHelp system (you will notice the some help events no longer fire). Please make sure you download "Delphi Example 12" which includes a fix file (D6OnHelpFix.pas). All you need to do is include the D6OnHelpFix.pas unit anywhere in your project and all help events will then fire as they did in Delphi 3/4/5.  Delphi 2009+ seems to have fixed the problem and wont require the fix.

C++ Builder Instructions

Borland C++ Builder 6 has the same problem (since Delphi and C++ Builder share the same VCL code).
Bernward Mock kindly describes how he uses the Delphi OnHelp Fix in his Borland C++ Builder projects.

Here are the steps I performed in BCB6:
1. I copied "D6OnHelpFix.pas" into my project directory
2. "Compilers_.inc" must be also present in this directory
3. In the project menu, I choosed "Add to project..." -> Pascal-Unit and
   added "D6OnHelpFix.pas"
   (I have a german version of BCB6, I don't know if "Add to Project..." is the
   correct term)
4. Run the project (a D6OnHelpFix.hpp and D6OnHelpFix.dcu were created by
   this step)
Thats all. There is no need for a #include.

Documentation

The Delphi HH Kit and Code Examples (below) actually accompany a technical paper I wrote while under contact to Work Write Inc. Cheri has graciously made the document free to download from her Help Think Press web site.

Technical Paper:

 

German HH Tutorials

If German is your first language you should check out Martin Strohal's German Delphi web site:



The Delphi Code Examples

The code examples show you how to program all HTML Help API commands, how to embed the IE WebBrowser and HH windows into your Delphi applications, how to write "What's This" help, how to create ActiveX extensions for Chm Help files, and how to change your WinHelp based applications over HTML Help. And much more.

Last update: 24-Feb-2006 - Minor update - Updated core files hh.pas, hh_funcs.pas, D6OnHelpFix.pas.

\Example 1 Accessing the HH API using static loading. Common HH API commands.
\Example 2 Accessing the HH API using dynamic loading. Common HH API commands.
\Example 3 Hooking help events in Delphi. Moving from WinHelp to HTML Help.
\Example 4 Advanced HTML Help API calls. What's this help.
\Example 5 Embedding Internet Explorer TWebBrowser control into Delphi applications.
\Example 6 Embedding HH windows in Delphi applications.
\Example 7 Extending HTML Help using ActiveX.
\Example 8 Finding open HH windows. Manipulating HH windows.
\Example 9 How to modifying a HH window using low level windows API calls.
\Example 10 CHM Explorer demo. How to read the contents of a CHM file.
\Example 11 Programming KeyHelp.ocx interfaces and methods.
\Example 12
 
Fix for Delphi 6/7/8/etc applications that use the Delphi OnHelp event.
Download the latest version of Example 12 (now supports D7/D8/...).  Not required for Delphi 2009 ().

See also: Using the fix in C++ Builder (above)

\IE5WinUpdateSrc Internet Explorer 5 silent installer source code.

For more information see the readme.txt file in each example folder.

Downloading the Code Examples

To get the code examples you need to subscribe to our "DelphiHHKit" EGroup Newsletter. 

Why Subscribe?

  1. So you can get access to the "DelphiHHKit" files section where the code is stored.
  2. So we can keep track of how many people are using our code. As long as we know people are using it we will continue to maintain the code.
  3. So we can notify you of any corrections or updates.

How to Download HH Kit 1.09

  1. Go to the "DelphiHHKit" Yahoo Group and Subscribe
    http://groups.yahoo.com/group/DelphiHHKit/join

  2. Go to the "DelphiHHKit" files area and click the required download
    http://groups.yahoo.com/group/DelphiHHKit/files/

    For convenience we recommend that you download the ZIP containing the compiled EXEs. There is also a ZIP that excludes the EXEs if you want to reduce download time and compile the examples yourself.

    Note that all EXEs have been compressed with UPX, hence their relatively small shipping size.

Once you have the code you are free to unsubscribe, but we hope you will stay on so we can keep you up to date. We plan to post members 1-4 times a year depending on what develops.

Delphi 2009

HH Kit 1.10 is available here - Details in our blog post.

Further Reading

Farbanner.gif (27984 bytes)