Posts Tagged ‘Delphi’

Delphi HH Kit 2.1

Thursday, December 3rd, 2009

Uploaded a new HTML Help Kit which is compatible with Delphi 2009 & Delphi 2010

Code examples have not really changed since the last 2009 update.

hh.pas – The HtmlHelp() function is either Ansi or Unicode depending on the Delphi you are running (Delphi 2009 + is Unicode).

hh_funcs.pas – Now compiles under Delphi 2010.

As I understand it Delphi 2006 and up now has the basic HtmlHelp() API declaration in Windows.pas. So consider using that instead of hh,pas if you just need to do basic calls to open help.

Also I believe that Delphi 2009 and up has fixed the “Help Events not firing” bug. So our special unit D6OnHelpFix.pas should not be required on newer Delphi systems.

Delphi 2009 + HH Kit 1.10

Wednesday, December 31st, 2008

** See newer post – Delphi 2010 + HH Kit 2.1 **

I got to play with Delphi 2009. Very nice. CodeGear seem to have done a great job. I wanted to see if our win32 Delphi HH Kit code still worked OK.

It had some problems and I had to update our source. Delphi 2009 now has full UNICODE support. String is now type UnicodeString rather than AnsiString. So all the calls to HtmlHelp() (declared in hh.pas) now fail unless you change your code over to HtmlHelpW().

To make it easier I updated hh.pas so that HtmlHelp() now calls the HtmlHelpW Unicode API func for Delphi 2009 +, and the HtmlHelpA ANSI API func  for older versions of Delphi. I’ve also gone through all our Delphi help examples - they should all now work with Delphi 2009. HH.pas also required many of the PChar params to change over to PAnsiChar as I found that many of the more exotic help API calls worked only with ANSI String parameters (see Help Kit Example 4 which exercises most HH API functions).

HH Kit Version 1.10 Download:

http://cid-5ce48093afda9e38.skydrive.live.com/browse.aspx/Public/delphi/HHKitV1.10

  • hh_doc.txt – Delphi HH Kit V1.10 Readme and documentation.
  • delphkit.zip- Contains the basic HH V1.10 Kit files – hh.pas (API port) + hh_funcs.pas (extra help funcs) + hh_doc.txt
  • code_Release_D2009.zip – Contains everything. HH V1.10 Kit + Help Examples (source code + compiled EXE).

List of help examples: http://helpware.net/delphi/index.html

That’s it for now. It wasn’t a difficult port. I did find that under Delphi 2009, the example apps required a call to Sleep(0) after the HH_CLOSE_ALL call otherwise they would crash on shutdown. This has been a  known problem with HTML Help.

Also the infamous D6OnHelpFix.pas file which fixes help events so they fire under Delphi 6+, is no longer required under Delphi 2009. All help events all seem to fire nicely under Delphi 2009 without the assistance of D6OnHelpFix.pas.

The download above was tested on Delphi 2009, but I haven’t had a chance to test on other version yet (although nothing should have changed for previous versions of Delphi).

Please let me know if you see any problems.

Please join the “DelphiHHKit” Yahoo Group for our news letter (we post about once a year when an update is required)
http://groups.yahoo.com/group/DelphiHHKit/join

Cheers
Rob