Vcl.Forms.TApplication.HelpContext

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HelpContext(Context: THelpContext): Boolean;

C++

bool __fastcall HelpContext(System::Classes::THelpContext Context);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TApplication

Description

Displays the Help topic specified by the numeric context identifier.

Use HelpContext to show the Help topic specified by the numeric context identifier Context and which is from the file specified in the CurrentHelpFile property. HelpContext generates an OnHelp event (either on the active form or on the application object itself). If there is no OnHelp event handler, or if the event handler indicates that HTMLHelp should be called, then HelpContext invokes the HTMLHelp Windows help engine, passing it the context ID specified in the Context parameter.

For example, if the Context value is 714, the HelpContext method displays the help topic with the 714 context ID in the Help file specified by CurrentHelpFile. In case of a .chm help file, you must map symbolic Context IDs of Help topics to numeric Context values in the [MAP] section of your project (.hhp) file.

HelpContext returns False if CurrentHelpFile is an empty string, meaning the application has no Help file assigned. In all other cases, HelpContext returns True.

In order for the Help to work properly, insert in the uses clause of your application the Vcl.HtmlHelpViewer or another unit that provides an interface to the external Help viewer to use. The Vcl.HtmlHelpViewer unit provides a Delphi interface to the HTMLHelp Windows native Help handling function. For C++, you need to include the HTMLHelpViewer.hpp header files.

For information about the native Help handling functions (HTMLHelp or other) and about the data passed to them, see the appropriate HTMLHelp topics in the MSDN Library.

See Also