Cicode Programming Reference > Cicode Function Categories > Window Functions Introduction > WndHelp

WndHelp

Invokes the Windows Help application (WinHlp32.EXE) to display a specific topic from a specific help file.

Syntax

WndHelp(sHelpFile, Command, Data)

sHelpFile:

The help file to display.

Command:

The type of help:

1 - Displays the help topic identified by the context string/number in the Data field. The context string/number needs to be defined in the [MAP] section of the help's .HPJ file.

2 - Closes the Help application. Enter an empty string for the Data argument.

3 - Displays the help contents topic defined by the CONTENTS option in the [OPTIONS] section of the .HPJ file.

4 - Displays the contents topic of the designated How to Use Help file. The context string/number (specified in the Data field) needs to be defined in the [MAP] section of the .HPJ file.

5 - Changes the current help contents topic to match the context string/number specified in the Data field. This topic is used instead of the one defined by the CONTENTS option in the [OPTIONS] section of the .HPJ file. This will affect Command 3 (see above). The context string/number needs to be defined in the [MAP] section of the help's .HPJ file, and the help file needs to already be open. The change will last only until the help file is closed.

8 - Displays, in a pop-up window, the help topic identified by the context string/number in the Data field. The context string/number needs to be defined in the [MAP] section of the .HPJ file.

9 - Tests that the correct help file is displayed. If the correct help file is currently displayed, this command merely makes the help the active window. If the incorrect help file is displayed, WinHelp opens the correct file, and displays the help contents topic defined by the CONTENTS option in the [OPTIONS] section of the .HPJ file.

Note: This command will not distinguish between two files of the same name, regardless of their paths.

11 - Displays the CitectSCADA Help Topics with either the Contents, the Index, or the Find tab selected, depending on which one was last used. Enter an empty string for the Data argument.

257 - Searches the help index for your keyword (as specified in the Data field) and displays the first topic in the index with an identical match. If there is no match, displays the index with your keyword already entered. To display the index without passing a keyword, enter an empty string for the Data argument.

258 - Executes the Help macro string specified in the Data field. Help needs to be running and the help file needs to be open, or the message is ignored.

260 - Displays, in a pop-up window, the help topic identified by the context string/number in the Data field.

261 - Searches the help index for your keyword (as specified in the Data field) and displays the first topic in the index with an identical match. If there is no match, displays the index with your keyword already entered. To display the index without passing a keyword, enter an empty string for the Data argument.

Data:

The context string/number or keyword of the help topic that is requested.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

WndViewer

Example

WndHelp("MyHelp.HLP", 3, 1);
! Displays the "MyHelp" Contents page.
WndHelp("C:\Help\Process.HLP", 8, 239);
! Displays topic labelled "239" in the "Process" help file.

See Also

Window Functions