Creating HTML Help

Mapping Topics to Ids

In order to be able to specify what topic to display from your VB program, you need to map Topics to ID's, and then give the ID's values.

The first thing we need to do is alias the topics to topic ID's. Even if you specify a topic ID within the topic file itself, you may as well do it as a comment, because the workshop has no way to extract that information.  Click on the API button , and go to the Alias tab of the resulting dialog box:

Click add to specify a Topic ID for each topic file:

We use the IDH naming system because every one else does - it has become the standard, and who are we to argue? Try to make the Topic ID as clear as possible, so that you can remember what topic it links to, even after a hard days work. Then, select the file you want it to refer to.

Next, we need to assign a value to the Topic ID constant (that we will pass from VB). The HTML Help workshop does not allow you to do this, so, save your work and close the project, and go back to notepad. Go to the Alias section, and you will see some ID's, and the files you have assigned them to.


Now, go to the Map section (which probably does not actually exist yet, in which case, create it below the Alias section). We need to add some statements that will assign a value to each Topic ID. We use the following syntax:


Here is an example:

#define IDH_FIND_DIALOG 1010
#define IDH_DLG_INSERT 1020
#define IDH_WELCOME 1000

Again, because every one else does, the Context Integers start from 1000 and work up in increments of 10. Save the file, and reload the file from the HTML Workshop. 

You might also like...


About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” - Dennis Ritchie