Getting F1 help to work in existing MFC application
Posted on 2009-02-19
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.