65.9K
CodeProject is changing. Read more.
Home

Office 2000 Style Html Help Viewer

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.45/5 (8 votes)

Feb 5, 2001

viewsIcon

140765

downloadIcon

1962

A free (source included) Html Help Viewer, in the style of the Office 2000 Help Viewer, including docking and auto-hide.

  • Download source files/demo - 87.2kb

    Sample Image - Off2kHelpDlg.gif

    Note: You cannot run the demo app without createing the required registry keys.

    Introduction

    If you have ever used Microsoft Office 2000, you will have encountered the help viewer at some time. I'm not talking about that pesky paper clip, but the custom HTML Help viewer Office 2000 uses. The Office 2000 help viewer allowed you to dock it to the left or the right of the screen, float it on top of your desktop, or minimize it if it is not needed. It also auto-hides if you leave it alone.

    This program attempts to copy as much of the functionality of the Office 2000 help viewer as possible. You can float the window. You can dock it to the left or the right of the screen (it even 'snaps' to the edge!). You can minimize and maximize it (maximization is only as large as an Explorer Appbar can go, rather than full screen). You can also choose to have the viewer auto hide (scroll off the edge of the screen, like an auto hiding taskbar). Not only that, but you shouldn't need to modify a single line of code to use it with your app (it is an external program). This means that a program written in any language that can use the Windows registry can use it. The source code is included with this article in the hope that some people with a little free time can help to add the other features the Office 2000 help viewer has, such as the contents, index and search tabs. I could add them if I had time, so you may find an update following this article...

    1. Quick Guide
    2. Credits
    3. Update History

    Quick Guide

    As mentioned above, the help viewer is a separate program that can be called from any other program that can write to the Windows directory. All you need to do to use it is write three values to the registry, under the key HKEY_LOCAL_MACHINE\Software\HelpViewer\AppName. You can change the registry key location in the source if you wish. The three entries are as follows:

    Type Caption Value
    String HelpTitle The caption for the help window, e.g.: "My Help Window Title"
    String HelpPath The location of the HTML Help file, e.g. "C:\AppName\Help\file.chm"
    String index.html The file within the HTML Help file, e.g. "index.html"

    Note, the file called "index.html" must exist in the root of the HTML Help file, as this is shown when the home button is pressed.

    Then just execute the program (e.g. using ShellExecute(...)), and the help viewer will appear. The state of the viewer (e.g. docked position) is saved under this key as well, as a binary string. You should not edit this directly.

    Credits

    All these people wrote code that has been used in this program:

    Jeffrey Richter (CAppBar), Davide Calabro (CButtonST), KeyWorks Software (CHHCtrl), PJ Naughter (HKLM), and whoever wrote the SAPrefsStatic class (Smaller Animals?). Thank you to all of you.

    Update History:

    No updates yet