The source code for CHHCtrl and CItsFile is provided as is. No warranty of
any form is implied. You may use and modify the code as you see fit, including
redistributing any products derived from the code. You can download the code,
additional documentation (chhctrl.htm) and a sample Visual Studio 6 project by
clicking here.
What is CHHCtrl?
CHHCtrl is an MFC class designed for placing an
embedded help window inside of a dialog, property sheet, or window. The CHHCtrl
class hosts shdocvw directly rather then using the HtmlHelp API. With CHHCtrl,
you get access to all IWebBrowser2 methods, along with the following additional
support for HTML Help CHM files:
- Mapped IDs -- this allows you to use numeric values that your help
author can alias into the HTML file he/she chooses. Using mapped ids means
the author can change what file is displayed without having to recompile
your project.
- CHM file searching -- this uses the same algorithm as HTML Help for
locating your CHM file so you don't need to give a path to the CHM file.
Like the HtmlHelp API, CHHCtrl lets you specify a toolbar with the following
differences:
- You can choose to display or not display text labels.
- You can add any custom buttons you want.
- The Home button will appear before the Back button (more appropriate for
embedded help windows)
ScreenShots
The following screen shots are taken from the sample project included in the
source code download (see top of this page):

The above screen shot shows help embedded in a dialog that will change as the
user's mouse hovers over a control, or a user activates a control by clicking on
it.

The above screen shot shows help embedded in a dialog with a toolbar (part of
CHHCtrl). In this case, the help does not change unless the user clicks a
link.
Home