Calling HTML Help from Applications

From RAD Studio
Jump to: navigation, search

Go Up to Enabling Help in Applications

Note: Almost all of the Help features described in this section can be used in both Delphi and C++ applications in almost exactly the same way. For example, in Delphi you need to add the Vcl.HtmlHelpViewer unit into the uses clause of your application, while in C++ you need to add the #include Vcl.HtmlHelpViewer.hpp directive.

The RAD Studio IDE provides some options--available in Project Options and in the Object Inspector--that define which help topics from which help files to show. Together with the Help-handling classes supplied in the RTL and VCL libraries, these options provide the following features that assist you to show help in your RAD Studio applications without any manual code programming:

  1. Showing Help on Pressing F1
Pressing F1 is the standard way of activating help in applications. RAD Studio's IDE, using the RTL and VCL libraries, automatically generates code that handles showing help on pressing F1. The Object Inspector and other IDE features support setting of options that define the help file and the help topic to show on pressing F1.
The Default Handling of F1 Help in VCL Applications and Customizing F1 Help in VCL Applications topics discuss how to define the parameters of calls to the Help-handling functions.
  1. Showing Help on Pressing Buttons
You can use Help buttons--of the Vcl.Buttons.TBitBtn type and with the Kind = bkHelp kind--to show help topics.
  1. Showing Help on Clicking Menu Commands
RAD Studio provides 4 standard help-handling actions (Vcl.StdActns.THelpContents, Vcl.StdActns.THelpOnHelp, Vcl.StdActns.THelpTopicSearch, and Vcl.StdActns.THelpContextAction), which can be assigned to your menu items or toolbar buttons.
  1. Showing Help About Selected Menu Commands
When you highlight a menu item, you can press F1 to show an associated help topic.
  1. Showing Prompts About Pointed Screen Objects
You can use the Hint properties to show contextual prompts about forms, controls, and other screen objects. Such prompts are also known as "What is this?" help.

See Also