Class XbpHelp() Foundation

Class function XbpHelp class.


The XbpHelp class provides objects that display online help files created by the help compiler. On modern Windows platforms, this is the Microsoft HTML Help Workshop (see the chapter Online Help in the Xbase++ documentation).

An XbpHelp object manages the online help window and can activate a particular help window within the online help. This allows help text that applies only to a specific dialog element to be displayed. In conjunction with XbpHelpLabel objects context sensitive online help is created.

Differences in online help systems
Windows RTF Windows HTML
Help compiler HCW.EXE HHW.EXE
Source code extension .RTF .HTM
Compiled help file extension .HLP .CHM

Class methods
Creates an instance of the XbpHelp class.
Instance variables
Displays the online help in debug mode.
Contains the numeric ID for the help text that is displayed when the "General help F2" option of the online help menu is selected.
Contains the numeric ID for the text that is displayed when the "Keys help F9" option of the online help menu is selected.
Life cycle
Requests system resources for the XbpHelp object.
Reconfigures the XbpHelp object.
Releases the system resources of the XbpHelp object.
Closes the online help window.
OS/2 - Displays the help window containing the General help text.
Displays the specified help window of the online help.
Displays the table of contents of the online help.
Displays the index of the online help.
OS/2 - Displays the help window containing help text for common key assignments used in the application.
OS/2 - The code block for cross referencing back to the Xbase++ application from the online help.
Activate online help under OS/2
// This example shows the basic process for calling 
// online help from an Xbase++ program. The source code 
// of the online help "EXAMPLE.HLP" is shown in the 
// example "Source code for online help". 

#include "" 

   LOCAL  nEvent, mp1, mp2, oXbp, oHelp, nRes 

   SetColor( "N/W" )                // Fill window with gray 
   ? "Call online help with F1" 
                                    // Create XbpHelp object 
   oHelp := XbpHelp():New( , "Example.hlp", "Example") 
   oHelp:inform := {|n| nRes := n } // Specify inform code block 
   oHelp:Create()                   // Request system resources 

   nRes   := 0 
   nEvent := 0 

   DO WHILE nEvent <> xbeP_Close    // Event loop 
      nEvent := AppEvent (@mp1, @mp2, @oXbp, 0.1) 

      DO CASE 
      CASE nEvent == xbeK_F1        // Display table of contents 
         oHelp:showHelpContents()   // of the online help (F1) 

      CASE nRes <> 0                // Process reference from 
                                    // online help 
         ? "Received message from online help:", nRes 
         nRes := 0 

      CASE oXbp <> NIL              // Send event to addressee 
                                    // (Xbase Part) 
         oXbp:handleEvent( nEvent, mp1, mp2 ) 


IPF source code for online help
.* The example shows the source code for the IPF file which 
.* is used for the program example "Activate online help". 
.* The file EXAMPLE.IPF must be compiled with IPFC.EXE 
.* to a HLP file so that the program example "Activate online 
.* help" can work. 


:h1 id=IPF_LINK.Cross reference within the online help 
:p.Click on the word 
:link refid=XPP_LINK reftype=hd.cross reference:elink. 
to activate another help window. 

:h1 id=XPP_LINK.Cross reference to the Xbase++ application 
:p.Click on the word 
:link res=100 reftype=inform.Xbase++:elink. 
to access the application. 


Activate online help under Windows
// A comprehensive example for a Windows online help project 
// is found in the ..\SAMPLES\BASICS directory. It includes 
// PRG source code, project file (HHP file), table of contents 
// (HHC file), index (HHK file) and HTML sources. 

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.