This section explains OnHelp, the Help menu's Help message-handler member functions.
At any time while the Phone Book program is running, the user can choose the Using Phone Book command in the Help menu to get information about how to use the program. This Help is somewhat context-sensitive. That is, different information appears for different situations. This menu command calls the main window object's OnHelp member function.
If no database is open, OnHelp displays a dialog box explaining that the user can create or open a database.
If a database is open but has not been saved, the function displays a dialog box explaining how to save it. This dialog box also has a Continue button that the user can click to display a second dialog box explaining how to add, delete, and edit persons in the database.
If a database is open and has no unsaved changes, the function displays the dialog box discussed above, which explains how to add, delete, and edit persons in the database.
Each of these dialog boxes uses a CModalDialog object. Each uses its own separate dialog resource template in the .RC file.