- Table of Contents
- Copyright
- About the Authors
- About the Contributors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- How to Use This Book
- What You Need to Use This Book
- What's New in Visual C++ 6.0
- Contacting the Main Author
- Part I: Introduction
- Chapter 1. The Visual C++ 6.0 Environment
- Part II: MFC Programming
- Chapter 2. MFC Class Library Overview
- Chapter 3. MFC Message Handling Mechanism
- Chapter 4. The Document View Architecture
- Chapter 5. Creating and Using Dialog Boxes
- Chapter 6. Working with Device Contexts and GDI Objects
- Chapter 7. Creating and Using Property Sheets
- Chapter 8. Working with the File System
- Chapter 9. Using Serialization with File and Archive Objects
- Part III: Internet Programming with MFC
- Chapter 10. MFC and the Internet Server API (ISAPI)
- Chapter 11. The WinInet API
- Chapter 12. MFC HTML Support
- Part IV: Advanced Programming Topics
- Chapter 13. Using the Standard C++ Library
- Chapter 14. Error Detection and Exception Handling Techniques
- Chapter 15. Debugging and Profiling Strategies
- Chapter 16. Multithreading
- Chapter 17. Using Scripting and Other Tools to Automate the Visual C++ IDE
- Part V: Database Programming
- Chapter 18. Creating Custom AppWizards
- Chapter 19. Database Overview
- Chapter 20. ODBC Programming
- Chapter 21. MFC Database Classes
- Chapter 22. Using OLE DB
- Chapter 23. Programming with ADO
- Part VI: MFC Support for COM and ActiveX
- Chapter 24. Overview of COM and Active Technologies
- Chapter 25. Active Documents
- Chapter 26. Active Containers
- Chapter 27. Active Servers
- Chapter 28. ActiveX Controls
- Part VII: Using the Active Template Library
- Chapter 29. ATL Architecture
- Chapter 30. Creating COM Objects Using ATL
- Chapter 31. Creating ActiveX Controls Using ATL
- Chapter 32. Using ATL to Create MTS and COM+ Components
- Part VIII: Finishing Touches
- Chapter 33. Adding Windows Help
- Part IX: Appendix
Windows Help Basics
Microsoft has already done most of the work for you when it comes to implementing help for your application. It has taken care of handling the user-interface framework that is presented to the user. You need to add the specific content for your project, and add code to your application to start up the Windows help facility. You will see how to implement your own help later in this chapter, but let's start with the basics of how Windows help works.
There are two different types of online help provided by Windows applications:
- Windows Help, also known as WinHelp, is the traditional online form of help found in many older Windows applications.
- HTML Help, the newer form of online help that's based on compiled HTML scripts. This is the type of online help used by Visual C++.
Understanding WinHelp
The older, traditional form of Windows help is handled by a separate program named WinHelp.exe, or WinHelp for short. This program presents the standard help dialog to the user, displaying the contents of your help project, as shown in Figure 33.1.
Figure 33.1 The WinHelp dialog.
You can quickly tryout this yourself by entering a command line like the following:
WinHelp MyHelp.hlp
By default, the WinHelp dialog provides three tabs, although you may add your own custom tabs if you like. The Contents tab will display the table of contents for your help file, as shown in Figure 33.1.
The Index tab will display a list of the topics contained in your help file, and allows the user to search the list to find the subject she is interested in, as shown in Figure 33.2.
Figure 33.2 The WinHelp Index tab.
In addition, WinHelp allows the user to do a full-text search through the help file by using the Find tab. However, before the user can access the Find tab, the user will see the Find Setup Wizard dialog shown in Figure 33.3.
Figure 33.3 The Find Setup Wizard.
This dialog allows the user to specify how WinHelp should create the database file (.FTS) that is used to help perform the full-text search. For large help files, like those used with Developer Studio, building this database can take several minutes.
After the database has been created, the user is presented with the Find tab, as shown in Figure 33.4.
Figure 33.4 The WinHelp Find tab.
This dialog allows the user to search the list of words contained in the help file, or begin typing a keyword or phrase in the top edit box. Whenever a word or phrase is selected, the user will see the list of topics containing that word in the bottom list box. Double-clicking one of these topics or clicking the Display button will bring up the help text for the selected topic.
Most users of Windows applications are familiar with how to use this interface to retrieve the help information that they want. All you have to do is make sure that your help file contains this information and that it is structured to allow easy access.
Understanding HTML Help
HTML Help is similar in many ways to the older WinHelp online help system discussed in the previous section. HTML Help is widely used in Microsoft products—it's used to create the MSDN Library used for online help with Visual C++.
To the end-user, the HTML Help user interface appears similar to the WinHelp user interface. By default, the user interface is divided into two sections. On the left side, navigation tabs enable a user to choose a method to find a particular help topic. By default there are three tabs:
- Contents
- Index
- Search
It's also common to add an additional Favorites tab, as found with the MSDN Library.
The Contents tab lists available help topics in a hierarchical view, as shown in Figure 33.5.
Figure 33.5 An example of a basic HTML Help Contents page.
The Index tab, shown in Figure 33.6, lists topics in alphabetical order.
Figure 33.6 An example of a basic HTML Help Index page.
The Search tab, shown in Figure 33.7, lists topic keywords in alphabetical order.
Figure 33.7 An example of a basic HTML Help Search page.
The user interface used by the MSDN Library, shown in Figure 33.8, has been customized to include a drop-down combo box that enables a user to select library subsets for browsing, as well as store a list of topics in the Favorites page.
Figure 33.8 The MSDN Library customizes the HTML Help user interface.
Help Options in AppWizard | Next Section

Account Sign In
View your cart