Apply help to wizard base project

Posted on 2007-07-23
Last Modified: 2013-11-20
Hi Experts,

 I am creating a wizard base application using CPropertysheet and CPropertypage.
This application is working fine for me.
Now I want to implement my help file ( wizard.chm) on the clicking of it'e default HELP button.
I am not able to find the appropriate place to write code for help file displaying.

Can any on help me

Question by:davinder101
    LVL 22

    Accepted Solution

    You may add a command handler for the help button, like this


    BEGIN_MESSAGE_MAP(CPageWithHelp, CPropertyPage)

    void CPageWithHelp::OnHelp()
    HtmlHelp(NULL, _T("C:\\testhelp.chm"), HH_DISPLAY_TOPIC, 0);

    This should enable the help button on activating the property page.

    The HtmlHelp function call requires:
    #include "Htmlhelp.h"

    and in the project settings, tab "link", entry "object/library modules":htmlhelp.lib

    See knowledge base article:
    HOWTO: Set Up Visual C++ to Use the HTML Help API

    For how to produce compiled html (".chm") files. You may check the page:

    LVL 15

    Expert Comment


    I'd suggest to have a look at this project:

    ... it has a good rating and I hope it's what you're looking for!

    Best regards,
    LVL 43

    Expert Comment

    >>clicking of it'e default HELP button.

    You shouldn't need to write any code - the default handler ought to start the 'chm' file for the application

    Author Comment

    Hi Mahesh,
    Thanks , This code really works  , and now i am able to open the help file by clicking the Help button. But still Help shotcut Key "F1" is not able to show the help file. It is showing the error message.

    LVL 22

    Expert Comment

    well then may be I think you need to trap WM_HELPINFO message and then you may send WM_HELP to your active property page or may invoke your html help directly....

    something like

    BOOL CTreePropSheetEx::OnHelpInfo(HELPINFO* pHelpInfo)
      CPropertyPage* page = GetActivePage();
      if( page != NULL )
        page->SendMessage(WM_HELP, 0, reinterpret_cast<LPARAM>(pHelpInfo) );

      return TRUE;

    Just try by handling WM_HELPINFO something like this way and check if it works with F1....

    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    A short article about a problem I had getting the GPS LocationListener working.
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now