A Help Example with No Programming Required
Chapter 18, you selected the MFC Application Wizard's Context-Sensitive Help option. We'll now use that example to explore the application framework's built-in help capability. You'll see how easy it is to link help topics to menu command IDs and frame window resource IDs. We'll edit RTF files, not CPP files.Here are the steps for customizing the help for Ex18d:
Verify that the help file was built correctly. If you've built the Ex18d project, the help file was probably created correctly as part of the build process. Check this by running the application and then pressing the F1 key. You should see the generic Application Help screen with the title "Modifying the Document," as shown here:

If you do not see this screen, the help file was not built correctly. You can rebuild it by rebuilding the entire solution. Rerun the Ex18d program, and press F1 again.
Test the generic help file. Try the following experiments:
Close the Help dialog box, press Alt+F, and then press F1. This should open the help topic for the File New command. You can also press F1 while holding down the mouse button on the File New command to see the same help topic.
Close the Help dialog box, click the Context Help toolbar button and then choose Save from the File menu. You should get the appropriate help topic.
Click the Context Help toolbar button again, and then select the frame window's title bar. You should get an explanation of a Windows title bar.
Close all child windows and then press F1. You should see a main index page that is also an old-style table of contents.
Change the application title. The file

Change the Modifying The Document Help screen. The file


Add a topic for the New String Window and New Hex Window commands on the Window menu. The New String Window and New Hex Window commands were added to Ex18d, but without appropriate help text. Add a topic to


Be sure the # footnote that links the topic to the context ID uses HID_WINDOW_NEWSTRINGWINDOW and HID_WINDOW_NEWHEXWINDOW, as defined in hlp\

Rebuild and test the application. Rebuild the entire application to synchronize the help files. Try the two new help links.