How do I add a .chm help file to my application built in Lazarus?

983 views Asked by At

The only documentation I can find online points me to a demo application called Ihelp which doesn't appear to exist in my version of Lazarus (v1.2.4).

I've created my .chm help file and just want to make it available when the user presses F1 (or selects 'Help' from a popup menu).

There is a CHM component in the FCL but I can't figure out how to use it.

Also the Form appears to have various Help related parameters but again I cannot figure out how to use them - all examples seem to point to separate HTML files rather than a compiled HTML help file.

2

There are 2 answers

1
Andrew On

I think Lazarus has a HtmlHelp API as well in packages\winunits-base\tests/hhex*

This forum discussion has more details about it: http://forum.lazarus.freepascal.org/index.php/topic,25492.msg154922.html?PHPSESSID=68463ec6cc0de1a479b6c03165b817e3#msg154922

3
Cielo Invernale On

There's a wiki page about it in the Lazarus/FreePascal wiki: http://wiki.lazarus.freepascal.org/Add_Help_to_Your_Application

As far as my knowledge Lazarus provides help files as HTML files by default, anyway CHM files are supported too.

There's a sample program in your Lazarus installation:

${lazarusdir}/components/chmhelp/democontrol/.

This demo shows how to set up a context- sensitive help button (F1 usually).

Be sure to check the documentation about lhelp, the default Lazarus CHM viewer too, described here:

http://wiki.lazarus.freepascal.org/lhelp