Click here to Skip to main content
15,867,330 members
Articles / Desktop Programming / MFC
Article

Office 2000 Style Html Help Viewer

Rate me:
Please Sign up or sign in to vote.
4.45/5 (10 votes)
19 Feb 2001 139K   2K   45   19
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

  • License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    CEO Bttlxe Ltd & Incentica Ltd
    United Kingdom United Kingdom
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralLooks great David! Pin
    uuy26-Jan-04 19:14
    uuy26-Jan-04 19:14 
    Generalhtml frames Pin
    collean22-Apr-03 6:10
    collean22-Apr-03 6:10 
    GeneralData Report can not refresh Pin
    Khairul-GIO315-Feb-03 9:20
    sussKhairul-GIO315-Feb-03 9:20 
    Generalmp3 programing Pin
    21-May-02 10:07
    suss21-May-02 10:07 
    GeneralBrilliant Stuff Pin
    Komtiki17-Apr-02 23:27
    Komtiki17-Apr-02 23:27 
    GeneralRe: Brilliant Stuff Pin
    David Wulff18-Apr-02 3:31
    David Wulff18-Apr-02 3:31 
    QuestionShould this work with WinNT and without MSIE? Pin
    21-Mar-02 1:01
    suss21-Mar-02 1:01 
    AnswerRe: Should this work with WinNT and without MSIE? Pin
    David Wulff21-Mar-02 1:07
    David Wulff21-Mar-02 1:07 
    GeneralCool! Pin
    Jim Crafton25-Sep-01 15:39
    Jim Crafton25-Sep-01 15:39 
    GeneralRe: Cool! Pin
    David Wulff26-Sep-01 7:35
    David Wulff26-Sep-01 7:35 
    GeneralRe: Cool! Pin
    Uwe Keim3-Apr-02 20:10
    sitebuilderUwe Keim3-Apr-02 20:10 
    GeneralHelp! Pin
    25-Apr-01 2:43
    suss25-Apr-01 2:43 
    GeneralExcellent... Pin
    Thomas Freudenberg20-Feb-01 22:22
    Thomas Freudenberg20-Feb-01 22:22 
    GeneralRe: Excellent... Pin
    David Wulff21-Feb-01 3:47
    David Wulff21-Feb-01 3:47 
    but the setting of the caption's font does not work. DoDataExchange seems to be the wrong place.

    I don't have this problem. I just checked by modifiying the CWBHelpDlg::DoDataExchange(...) function to use Comic Sans MS as it's font, rather than the 'SPI_GETICONTITLELOGFONT' font, and it worked fine. Maybe you could send me your modified version of CWBHelpDlg::DoDataExchange(...), then I could take a look at it. It may just be that the program only works on my machine (I didn't test it, I just 'presumed' it would work with compatible machines - always a big mistake).

    Also the the underlying window gets not repainted properly, when the WBHelp folds

    I'm not sure what can be done about this. I have not expierienced this problem either, and the 'folding' is done by the CAppBar class, which I didn't write. I have tried to keep out of there as much as possible, but maybe the problem lies in CAppBar::SlideWindow(...). I'm afraid I can't help if I can't reconstruct the problem Confused | :confused: .

    Anyway, your app is very helpful

    Thank you.

    David Wulff
    dwulff@battleaxesoftware.com
    GeneralRe: Excellent... Pin
    Thomas Freudenberg21-Feb-01 4:11
    Thomas Freudenberg21-Feb-01 4:11 
    Generalnice job... Pin
    5-Feb-01 21:13
    suss5-Feb-01 21:13 
    GeneralRe: nice job... Pin
    David Wulff6-Feb-01 5:05
    David Wulff6-Feb-01 5:05 
    GeneralRe: nice job... Pin
    Andrew Peace1-Apr-01 7:37
    Andrew Peace1-Apr-01 7:37 
    GeneralDon't worry Pin
    David Wulff1-Apr-01 7:45
    David Wulff1-Apr-01 7:45 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.