Building a Help System for Delphi Applications - Creating Contents, Headings and Topics
(Page 2 of 4 )
The next thing we need to do is to create a contents file, so go to File | New and select "File Contents." A window will appear with options to set "Default filename" and "default title." Set the default title to My Project Help File and leave the default file name empty. Save the file; you do this by simply clicking on the floppy disk image on the tool bar or by selecting File | Save As.
Now we need to add the Headings and Topics for our help file. So click on either "Add above" or "add below." You will now have a number of options in front of you:
Heading
TopicI
Include
Macro
We are only interested in Heading and Topic, so select "Heading." You will see that of the four options, three will now fade and only the "title" option will remain. Enter the following:
How to Create a Help File Part - I
and click OK. You should now be back to the normal screen. Now we add the topics. Click on "Add Below" and select "topic" if it is not already selected. Enter the following:
Overview
And then where it says TopicID, enter the following:
IDH_HOWTOCREATEHELPFILE1
Press OK.
Repeat the process of creating a topic, but this time add:
Title: Beginning: Creating the Help File
TopicId: IDH_BEGINNING1
Press OK to close the window.
Now we need to add a new heading and two topics, so make sure that you are on the last topic on the list (Beginning: Creating the Help File), click on "Add Below," select "Heading" and add the following:
How to Create a Help File Part - II
Press OK to Close the window, click on "Topic" and add the following data:
Title: Overview 2
TopicID: IDH_HOWTOCREATEHELPFILE2
Press OK.
Repeat the process and add the following:
Title: Beginning: Creating the Help File 2
TopicID: IDH_HOWTO2
Press OK.
After all of that is done save your work. Your screen should now look something like this:
The next step is to add the cnt file to our project, so go to your .hpj file in Microsoft Workshop and click on "Options." You should see the following screen:

Go to the "Files" tab and then go to where it says "Contents File." Click on the "Browse" button and find and select the .cnt file that you saved earlier. Click OK, and your .cnt file should now be added to your project.
Next: Creating the Help Text >>
More Delphi-Kylix Articles
More By Leidago