?
Solved

Apply help to wizard base project

Posted on 2007-07-23
7
Medium Priority
?
372 Views
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


0
Comment
Question by:davinder101
6 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 500 total points
ID: 19545565
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
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 19545579
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
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 19545594
>>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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:davinder101
ID: 19545810
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
 
LVL 22

Expert Comment

by:mahesh1402
ID: 19545903
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
 
LVL 1

Expert Comment

by:Computer101
ID: 20209493
Forced accept.

Computer101
EE Admin
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

615 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