Most of the operation codes are used to manage context-sensitive help. For more information about ACUCOBOL-GT support for context-sensitive help, See Help Automation in User Interface Programming for more information. For a simple, context-independent help, you will typically use just the following operations:
|HELP-CONTENTS||Displays the topic specified by the Contents option in the [OPTIONS]section of the .HPJ file. Microsoft indicates that this command is for backward compatibility. New applications should provide a .CNT file and use the HELP-FINDER command. You do not use the third parameter for this call.|
|HELP-FINDER||Displays the Help Topics dialog box with the last tab used. You do not use the third parameter for this call.|
|HELP-PARTIALKEY||Use this operation to bring up the keyword-search window. The third parameter should be the entire or partial keyword you want to find. Typically, this will be set to LOW-VALUES to allow key searches throughout the keyword list. One easy way to do this is to use "x'00'" as the third parameter.|
|HELP-HELPONHELP||Calls up Help's own help file. The third parameter is not used.|
|HELP-QUIT||Use this to exit the Help application. Microsoft requires that each application using Help logs out when it is done (if it doesn't, then Help keeps running after the application has quit). Note that $WINHELP tracks each help file used and automatically logs out each one when the runtime shuts down. Because of this, you need to use HELP-QUIT only if you want to shut down Help prior to exiting your application.|
The help system provided with the ACUCOBOL-GT debugger uses these calls. The debugger presents three options to the user: "Contents", "Search", and "Help on Help". The COBOL code that corresponds to these cases is:
evaluate menu-selection when menu-contents call "$winhelp" using "acudebug.hlp", help-contents *Note newer applications should consider using help-finder instead of help-contents. when menu-search call "$winhelp" using "acudebug.hlp", help-partialkey, x"00" when menu-help-on-help call "$winhelp" using "acudebug.hlp", help-helponhelp end-evaluate.
This is all that's required to provide a simple help system. For information on creating a context-sensitive help system, see the SDK documentation.