Calling WinHelp Version 4.0


  

The following is an extract from Microsoft's help file for the 32 bit Help Workshop:   

 

Syntax

BOOL WinHelp(HWND hwnd, LPCTSTR lpszHelpFile, UINT fuCommand, DWORD dwData)

The WinHelp function starts Windows Help (WINHELP.EXE) and passes additional data indicating the nature of the help requested by the program.

 

Parameter Description   

 

hwnd

Handle of the window requesting Help. The WinHelp function uses this handle to keep track of which programs have requested Help. If fuCommand specifies HELP_CONTEXTMENU or HELP_WM_HELP, hwnd identifies the control requesting Help.

 

lpszHelpFile

Address of a null-terminated string containing the path, if necessary, and the name of the Help file that WinHelp is to display.

 

The filename may be followed by an angle bracket (>) and the name of a secondary window if the topic is to be displayed in a secondary window rather than in the primary window. The name of the secondary window must have been defined previously in the [WINDOWS] section of the Help Project (.HPJ) file.   

 

fuCommand

Type of help requested. For a list of possible values and how they affect the value to place in the dwData parameter, see the Comments section.

 

dwData

Additional data. The value used depends on the value of the fuCommand parameter. For a list of possible values, see the Comments section.

 

Return Value

If successful, the return value is TRUE; otherwise, it is FALSE.

 

Comments

The program specifies the name and, where required, the directory path of the Help file to display.   

 

Before closing the window that requested Help, the program must call WinHelp with the fuCommand parameter set to HELP_QUIT. Until all programs have done this, WinHelp will not terminate. Note that calling WinHelp with the HELP_QUIT command is not necessary if you used the HELP_CONTEXTPOPUP command to start Help.

 

See Also

Calling WinHelp()

#defines list

Examples

FuCommand Parameters

HELP Context ID Property  

The HELPINFO Structure

The HELPWININFO Structure

The MULTIKEYHELP Structure

The WM TCARD Message

Visual Basic