How to Call Context-Sensitive Help from Objects in Your Application

Previous Next

See Also

NOTE:

Use the Windows Designer to associate help topics with visible objects (controls) by specifying the map number for the topic, and the name of the help file from which to take it.

· For fields, the best place to set these properties is the Base Table class of the tables involved. The fields will then have What's This? help irrespective of the type of window they appear in.

 

· For windows/dialog, set these properties at the window level.

 

· For buttons, set these properties at the individual button level (unless they are standard buttons that appear in many windows/dialogs, in which case you should specify them for the highest possible level button that has that kind of behavior.)

To call context-sensitive help from objects in your application:

1. Open the application in the Windows Designer, and find the objects that you wish to associate with help topics.
2. For each object, open the Property inspector and in the General properties section, set the following properties:
· Help File: Specify the name of the help file file; in this case Objects.chm. By default, the file is searched for in the working directory. If required, specify the path to your help file as well. For example:

%SystemDir%\help\object.chm

· Help Popup: Set to Yes (default).
· Help Topic ID: Specify the map number defined for this object in the objectsmap.h file. For example: 101 in the case of Object 1.
3. Save your changes.

Assuming that your new CHM file is in the location specified above, you can test that the help works by choosing Design, Run from the Windows Designer menu and clicking the F1 key for each of the objects for which help was specified.