hi, after some search with google, i can't seem to find a proper tutorial on how to create help files in delphi applications.

I have no prior experience in creating help files in any client based applications, i was wondering if delphi ide itself has these components for me to write to?

9 Years
Discussion Span
Last Post by Duoas

Delphi provides you with the Microsoft Help Compiler (at least versions as old as D5 did), but using it directly is not fun.

You can google "help file creator" for the right stuff.

If you want to make HLP files, you can always check out Finn Christiansen's Shalom Help Maker, which is a nice, simple, 100% free tool. It looks like danish-shareware.dk is down right now... but you can google elsewhere.

If you want to make CHM files, I've never done that, so you'll have to sort through google yourself, alas.


Duoas, hi again.

I was wondering, is HLP files embeddable to delphi applications itself ?


Well, you can do that if you like, but you'd have to extract them before they could be used.

This is because WinHelp is a separate program which the application uses to display the help.


ok i had another go with this, i went through

i downloaded my hcw from :

but the application could not even call the help file at the end, when i click on 'help->about' it'll say that the file doesn't have table of contents!

what's weird, is that if i double click on the hlp file i compiled, and then click on contents, it ignores me and i won't see any table index.

if i move the file out from my project's folder and open the file, i could click on 'contents' and there'll be index coming out.


You are doing it the hard way. You really should download something like Shalom and use it...

The problem is that your help file doesn't have a table of contents. This is usually stored in a separate file, so you'd have frobinator.cnt frobinator.hlp How are you calling the help file? It doesn't need to have a contents, but WinHelp will complain if it is instructed to display the contents page for a help that doesn't have one.

(My own help files are often pretty small and succinct, so I tend to omit contents pages. However, all substantial help files should have a table of contents...)

In your code, you should have something like

procedure TForm1.FormCreate( Sender: tObject );
  // The help file is named the same as the program,
  // and is located in the same directory.
  application.helpFile := changeFileExt( paramStr( 0 ), '.hlp' )

procedure TForm1.AboutClick( Sender: tObject );
  // Context 42 is the help file's about page...
  application.helpContext( 42 )

If you use Shalom Help Maker, it can generate a little include file for you that gives constants for all the help contexts. So it could read:

{$R *.dfm}
{$include MY_HELP_Constants.inc}


procedure TForm1.AboutClick( Sender: tObject );
  application.helpContext( MY_HELP_ABOUT )

procedure TForm1.HelpClick( Sender: tObject );
  application.helpContext( MY_HELP_CONTENTS )


Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.