HTML Help: Using F1
-
I'm getting some weird results in my MFC application when I press F1 over a menu item. For some reason, I get an error "cannot open Help" when I press F1 over certain menu items. It seems totally random. I never did anything special to make it work for any of the items anyway. When I created the application, I enabled HTML help. I've been able to change the table of contents and add help files. But one thing I have not figured out is how to control what pops up when F1 is pressed. For most of the menu items, it works fine. For instance when I put the mouse pointer over the view -> status item and press F1 it immediately brings up the status help screen with the Main Help dialogue. When I do the same over File -> open or Help -> help topics I get the error message. I'm not finding anything specific in MSDN library. What is the trick here? I know I can handle a message to respond to F1 and have done this. But I was hoping to find another way. I mean after all, 95% of the menu items work fine when I press F1 but I have no idea what gives for the very few where it doesn't work. Also, in one of my dialogues I have written code for the function: HtmlHelp(NULL, HH_DISPLAY_TOPIC); Now this will display the main help window. The NULL could be a pointer to something. I don't know what it is a pointer to. Does anyone know? How do I use the first argument to cause a specific help topic to display within the help dialogue? I've tried a few things and don't think the documentation is entirely clear on what I am supposed to point the function to. Any ideas? Thank you, Shawn
-
I'm getting some weird results in my MFC application when I press F1 over a menu item. For some reason, I get an error "cannot open Help" when I press F1 over certain menu items. It seems totally random. I never did anything special to make it work for any of the items anyway. When I created the application, I enabled HTML help. I've been able to change the table of contents and add help files. But one thing I have not figured out is how to control what pops up when F1 is pressed. For most of the menu items, it works fine. For instance when I put the mouse pointer over the view -> status item and press F1 it immediately brings up the status help screen with the Main Help dialogue. When I do the same over File -> open or Help -> help topics I get the error message. I'm not finding anything specific in MSDN library. What is the trick here? I know I can handle a message to respond to F1 and have done this. But I was hoping to find another way. I mean after all, 95% of the menu items work fine when I press F1 but I have no idea what gives for the very few where it doesn't work. Also, in one of my dialogues I have written code for the function: HtmlHelp(NULL, HH_DISPLAY_TOPIC); Now this will display the main help window. The NULL could be a pointer to something. I don't know what it is a pointer to. Does anyone know? How do I use the first argument to cause a specific help topic to display within the help dialogue? I've tried a few things and don't think the documentation is entirely clear on what I am supposed to point the function to. Any ideas? Thank you, Shawn
I've just wrestled with similar issues myself, and found the following liks useful, if you haven't already found them: http://www.mshelpwiki.com/[^] http://www.smountain.com/resource/CPPHTMLHelp.pdf[^] Debbie