Context-sensitive help
Rick Esterling -- rick@eco.twg.com Monday, January 15, 1996 Hi all, I'm using MSVC 4.0/MFC 4.0 for a WinNT, 32-bit, dialog-based application (CWinApp and CDialog derived objects only). Even though my project is only a dialog-based application, I'd still like to provide context-sensitive help as is built into MFC. CWinApp includes a member method, OnContextHelp(), and several references in the documentation would have you believe that CWinApp alone is capable of doing context-sensitive help, but one look at CWinApp's source code (in apphelpx.cpp) reveals that all that really happens is that this call gets passed down to CFrameWnd::OnContextHelp(). Obviously, a dialog-based application doesn't include a CFrameWnd derived object. Does this mean my only alternative is to hand code context sensitive help for any and all dialog-based applications? Thanks, Rick ------------------------------------------------------------- Rick Esterling The Wollongong Group, Inc. Senior Software Engineer McLean, VA http://widget.eco.twg.com:1080 http://www.twg.com
Dave Brooks -- info@brooksnet.com Wednesday, January 17, 1996 [Mini-digest: 3 responses] At 12:35 PM 1/15/96 -005, Rick Esterling wrote: >Does this mean my only alternative is to hand code context sensitive help >for any and all dialog-based applications? Nope; in my dialog I have a Help button with ID set to the constant ID_HELP. I run "makehelp" (I have the compilation step turned off); this generates the right tags in foo.hm (where "foo" is the project). I have a help topic with this tag; how you do that depends on the help authoring tool you are using ... and there may be in import step involved, again depending on the tool. Then, it works. BTW, congrats on making context sensitive help; I do that with all dialogs, menu ids, and windows in my application. I only wish more people actually read help :-) But many do. Dave ************************************************************************** David L. Brooks Brooks Internet Software, Inc. info@brooksnet.com 1-800-523-9175 MST http://brooksnet.com/ Home of RPM, a new LPD server for Windows - check the Web page for demo! -----From: DOUG MILLERI could have sworn AppWizard had an option to enable context sensitive help. (This is the case in VC++ 2.x; it's a checkbox in step 2 of 4 in AppWizard.) A way to add it in after the fact would be to generate a skeletal app with and without context sensitive help and incorporate the differences into your app. --- With scissors, there can be no good haircuts. -----From: kitk@mudshark.sunquest.com (Kit Kauffmann) I found no alternative & coded a context-sensitive help system for dialogs which automatically adds the little context-help button just to the right or left of your regular help button (shortening it, of course). Since I inherit all dialogs from a parent which includes all the hard stuff, each dialog simply adds a dialog-specific 'help-map'. I'm legally constrained from distributing this, but I hope that is enough to get you started...
| Вернуться в корень Архива |