About the System Help Function

The system help function help_proc() takes as an argument a pointer to a help structure. The help structure is defined as:

typedef struct help_struc

{
 
    UINT tag;
/* Sentinel
*/
    WINDOWPTR wnp;
/* Pointer to the help window
*/
    int nextact;
/* Next action code
*/
    UCHAR *kwdp;
/* Pointer to keyword string
*/
    struct help_struc *nexthelp;
/* Pointer to next help structure
*/
} HELP, *HELPPTR;
   

help_proc() examines the help structure whose address is passed to it and determines if there is help information that can be displayed. This is done by doing the following checks:

After help_proc() pops up the help window and displays the information, control is passed to the user for browsing through the help information.

Input Processing

Keyboard and mouse processing is done using the help event table HELPETP. When a key is pressed by the user, the system event table is searched first and then the help event table. If the key pressed matches one in the event table, the function associated with the key is called.

If the user presses the Help key while in first-level help, help_proc() is called again. This time, it is passed the pointer to the next help structure member in the first-level help structure.

All other event functions in the help event table operate by setting the next action code in the help structure. help_proc() reads the next action code and, based on the value of the code, determines what to do next.

Browsing continues until an event function sets the next action code to AC_QUIT or AC_EXIT, at which point help_proc() returns to the calling routine.


Home Contents Previous Next