Was this helpful?
Create Help Files
On UNIX platforms, no default help compiler is provided. Help files created on Windows platforms, however, can be read using the UNIX version of OpenROAD.
If you are creating your own Help files in a Windows environment, perform the following procedure.
To create Help files in a Windows environment
1. Author the topic files and save them as .RTF (rich text format) files.
2. Using any system editor, create an .HPJ project file that lists all the .RTF topic files in your online help system and any options, such as secondary windows and color for non‑scrolling regions.
3. Run the .HPJ file through the Windows Help compiler.
The output is a compiled .HLP file that you can specify in your application and view with the Windows Help Viewer.
Specify Help Files in Your Application
You can specify help files for your application using an “on Click” event block.
To link your Help files to your application
1. Decide which Help menu items you want in your application (for example, Contents, Search, How to Use Help).
2. Create a Help menu for each frame that calls the Help file.
Note:  You can speed this process by adding the Help menu to the frame template for your application.
3. For each menu item, write an “on Click” event block that calls the following method:
CurSession.WinHelp(command=commandname,topic='Topic Title',context=context,
     helpfile='filename.hlp');
For more information about the WinHelp method, see online help.
If the Help file specified does not include the path, this method searches for the named Help files in the following locations in the order listed (if the help file is a full name, no search occurs):
The location of the application.img file
II_W4GLAPPS_DIR
%II_SYSTEM%\ingres\w4glapps (II_W4GLAPPS_DIR default)
Note:  During development—that is, when running the application from the database—you can place the development Help file in II_W4GLAPPS_DIR. During deployment, move the Help file to the same location as the application image file.
Call Help Topics
There are various ways to manipulate the help system from your application.
To call the table of contents for the online help system
on Click =
{
          CurSession.WinHelp
          (command=HV_CONTENTS,helpfile='myapp.hlp');
};
To call help for fields
Context-sensitive help for fields requires that each field have a help topic associated with it. One way to do that is to embed the field help topic in the field's ClientText attribute. For example, the client text for a field could contain the string “helptopic=Employee Name;”.
You can use the following code to check for the keyword “helptopic” in the field's client text at runtime. If the keyword is found, the code calls Help and specifies the value for that keyword as the topic:
on Click =
declare
          topic = varchar(32) not null;
enddeclare
{
          if CurFrame.InputFocusField is not null then
                    topic = _StringParseKeyword(keyword = 'helptopic', string=
                              CurFrame.InputFocusField.ClientText);
                    if topic != '' then
                              CurSession.WinHelp(command = HV_KEY,
                              topic = topic, helpfile = 'myapp.hlp');
                    else
                              message 'No help for this field.';
                    endif;
          else
                    message 'Select a field before choosing Field
                             Help.';
          endif;
}
Note:  _StringParseKeyword() is a general-purpose procedure, documented in online help and the Programming Guide.
To display online help for a frame
on Click =
{
          CurSession.WinHelp(command = HV_KEY, topic = 'Add
                    Employees', helpfile = 'myapp.hlp');
}
To call information about the help system itself (that is, to include the How To Use Help menu command)
on Click =
{
          CurSession.WinHelp(command = HV_HELPONHELP,
                    helpfile = 'myapp.hlp')
}
For more information about creating help files, see the Microsoft Visual C++ Help documentation.
Last modified date: 06/25/2024