Ex19c is also based on example Ex18d. It is an MDI application that includes two views to a single document and uses HTML Help. The example was created using the MFC Application Wizard with HTML Help Format selected on the Advanced Features page.
If you look in the file
If you're feeling gutsy, you can modify the help files with Notepad. The file includes tags that are used by the HTML help system, so tread lightly. However, a better option is to open the .HTM file in Visual Studio .NET. Visual Studio .NET understands HTML files and lets you edit them easily.
You might wonder how to create new help topics in the first place? The easiest way to create a new help topic is to take an existing HTM file, rename it appropriately, and then add new content to the file. Then you associate the new HTM file with the command ID as described below.
Visual Studio .NET adds help context IDs when you add new menu commands to the program and recompile it. Near the top of the
#define HID_WINDOW_NEWSTRINGWINDOW 0x10082 #define HID_WINDOW_NEWHEXWINDOW 0x10083
In addition to the standard menu command help created by the MFC Application Wizard, Ex19c has a new help topic for the New Hex Window command. The help context ID was generously included by Visual Studio .NET when the command was added. Now it needs to be tied to the
hid_window_newhexwindow = hid_window_newhexwindow
Finally, the
[files] afx_hidd_color afx_hidd_fileopen afx_hidd_filesave
hid_window_newstringwindow hid_window_newhexwindow hid_window_split
Once you relate the HTML files to the help command IDs, there's nothing else you need to do to get the help topics working. The rest of the built-in MFC help functionality will take care of the details for you. To see for yourself, run the Ex19c example, select various menu commands and push F1. You'll see the correct help screens appear after pressing F1.