Getting F1 help to work in existing MFC application

Posted on 2009-02-19
Medium Priority
Last Modified: 2013-12-14
I have an existing application that I am trying to add context sensitive help to. I have added in the appropriate class/functions as detailed in the MSDN article about adding help to an existing app. I do have the help menu hooked up so that when I select help the help window pops up and I can see my help info (I used WinHelp to build it). My problem is that I can't figure out how to hook a dialog or control to the help so when  you press F1 you get the specific help topic. I have read that you need to prepend the desired item's ID with an H (do IDD_BUTTON1 would be HIDD_BUTTON1) but I can't figure out how to make that work. I have it changed in the help file but it apparently does not know how to map it in C. I am a C/MFC novice, so please explain how to make this work in detail. Also, eventually I will need to change the mechanism to be a different key than F1, so how do that would be helpful too.
Question by:jadixon
LVL 19

Accepted Solution

LordOfPorts earned 1500 total points
ID: 23684140
I am not certain if this will be helpful however you might be interested in the following two MSDN videos:

How Do I: Use HTML Help in MFC? Part 1

How Do I: Use HTML Help in MFC? Part 2

The tutorial videos have a segment about context sensitive help however they are for HTML help and not WinHelp which you mentioned. WinHelp is actually an obsolete format and as of Vista is no longer included out-of-the-box according to http://en.wikipedia.org/wiki/Microsoft_WinHelp so you might consider switching.

Author Closing Comment

ID: 31548789
I have not viewed these videos due to time constraints.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
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.
Suggested Courses

862 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