HELP Mnemonic - Access WinHelp

Syntax

'HELP'(id,helpfile$,helpcmd{,cmdparam$})

Description

For BBj-specific information, see the HELP Mnemonic - Access HTML and Java Help .

Note: Visual PRO/5 Rev 6.0 and higher support both .chm and .hlp files. Older versions only support .hlp files.

The 'HELP' mnemonic accesses HTMLHelp or WinHelp from a Visual PRO/5 application and provides better control of the displayed contents.

Parameter

Description

id

Identifies a window, child window, or control in the current context. Specifies a zero value for windows. Specifies a nonzero value for child windows and controls.

helpfile$

Location of the .chm or .hlp file, relative to the current directory. Because Windows opens this file, prefixing or Data Server access is not supported. If a .hlp file is specified but only a .chm file is available, Visual PRO/5 will use the .chm file.

helpcmd

Help command, as specified in the table below.

cmdparam$

Help command parameters (a 4-byte integer or a formatted string) that correspond to a specific helpcmd, as specified in the table below.

Help Command Settings

The following defines the options for the helpcmd-specified help command:

helpcmd

Value

Description

cmdparam Parameter

HELP_COMMAND

0

Executes a help macro or macro string. CHM help files do not support this feature.

String that specifies help macro(s). Use the short form of macro names because Windows does not recognize long macro names. Separate multiple macro names with semicolons.

HELP_CONTENTS

1

Displays the topic specified by the Contents option in the [OPTIONS] section of the .HPJ file. This command is for backward compatibility within Windows. New applications should provide a .CNT file and use the HELP_FINDER command.

N/A

HELP_CONTEXT

2

Displays the topic identified by the specified context identifier defined in the [MAP] section of the .HPJ file.

Integer that contains the topic context identifier.

HELP_CONTEXTMENU

3

Displays the Help menu for the selected window then displays the topic for the selected control in a popup window. CHM help files do not support this feature.

Formatted string of unsigned integer pairs. The first in each pair is a control identifier, the second is a topic context number.

HELP_CONTEXTPOPUP

4

Displays the topic identified by the specified context identifier defined in the [MAP] section of the .HPJ file in a pop-up window.

Integer that contains a topic context identifier.

HELP_FINDER

5

Displays the Help Topics dialog box.

N/A

HELP_FORCEFILE

6

Ensures that Windows Help is displaying the correct help file. If the incorrect help file is displayed, Windows Help opens the correct one; otherwise, there is no action. CHM help files do not support this feature.

N/A

HELP_HELPONHELP

7

Displays help on how to use Windows Help, if the WINHLP32.HLP file is available. CHM help files do not support this feature.

N/A

HELP_INDEX

8

Displays the topic specified by the CONTENTS option in the [OPTIONS] section of the .HPJ file. This command is for backward compatibility within Windows. New applications should use the HELP_FINDER command.

N/A

HELP_KEY

9

Displays the topic in the keyword table that matches the specified keyword, if there is an exact match. If there is more than one match, displays the Index with the topics listed in the Topics Found list box. CHM help files do not support this feature.

Keyword string. Separate keywords with semicolons.

HELP_SETCONTENTS

10

Specifies the Contents topic. Windows Help displays this topic when the user clicks the Contents button if the help file does not have an associated .CNT file. CHM help files do not support this feature.

Integer that contains the Contents topic context identifier.

HELP_WM_HELP

11

Displays the topic for the control identified by the ID% parameter in a pop-up window.

String of double word pairs: The first in each pair is a control identifier, the second is a topic context identifier.

HELP_QUIT

12

Closes Windows Help, unless it is used by other applications. The helpfile$ parameter can be set to a null string, which, when Visual PRO/5 exits, will close Windows Help, unless it is being used by other applications. CHM help files do not support this feature.

N/A

Examples

Example 1 displays the help topics for a help file titled config.hlp:

0010 LET SYSGUI=UNT                                 
0020 OPEN (SYSGUI)"X0"                              
0030 PRINT (SYSGUI)'WINDOW'(100,100,100,100,"Window",$$,$$)
0040 PRINT (SYSGUI)'HELP'(0,"basismans.hlp",2,19)   
0045 ESCAPE

Example 2 displays the help topics for Help on Help:

print(sysgui)'help'(0,$$,7)

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing