Apply help to wizard base project

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


davinder101Asked:
Who is Participating?
 
mahesh1402Commented:
You may add a command handler for the help button, like this

e.g.

BEGIN_MESSAGE_MAP(CPageWithHelp, CPropertyPage)
//{{AFX_MSG_MAP(CPageWithHelp)
//}}AFX_MSG_MAP
ON_COMMAND(ID_HELP, OnHelp)
END_MESSAGE_MAP()

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
http://support.microsoft.com/kb/186907

For how to produce compiled html (".chm") files. You may check the page:
http://msdn2.microsoft.com/en-us/library/ms670169.aspx

-MAHESH
0
 
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

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

http://www.codeproject.com/winhelp/mfchelp.asp

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


Best regards,
Raisor
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
>>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
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
davinder101Author Commented:
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.

Thanks
0
 
mahesh1402Commented:
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....

-MAHESH
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.