Having built an application with Context Sensitive Help, and having added and edited the help (*.htm) files with M$ Expression Web 3, and further setting up Contents and Index files using M$ HTML Help Workshop (version 4.75, Jan 12 1999), I discovered that I can summon the *.chm help file using a method such as (assuming I have added #include <htmlhelp.h> and linked the associate htmlhelp.lib):

However, F1 will not summon the help file (as it did in the past), instead I receive the message:

Quote:

HH_HELP_CONTEXT called without a [MAP] section.

Further, if the application is installed using and msi file, the desktop shortcut that is rigged to call ViewHelp doesnt work at all ! ( No message, no error, no natha).

Now there is a great deal of web chatter about the failure of F1 help with Win 7 OS (which is what I'm using to build and test deploy). This is apparently something of a 'security issue' (isn't everything), so that one of the M$ updates made it this way.

For a nauseating lengthy discussion of the problem (as if this one wasn't), see

Further, if the application is installed using and msi file, the desktop shortcut that is rigged to call ViewHelp doesnt work at all ! ( No message, no error, no natha).

Very probable that the issue is related to using relative path to CHM file, which appears different in case of installing shortcuts or something like that. To test this I would recommend to construct fully qualified path to your help file and see if this helps.

February 13th, 2013, 02:31 PM

Mike Pliam

Re: Annoying problem with F1 help

Igor - your demo works when installed in Win 7 (Ultimate) Program Files (x86) / My Company/ - both with the OK button and with F1. BTW, your method of using make.bat files is very clever. It took me awhile to figure out how to run it (I'd forgotten to use the command line prompt). I wish I knew how to write the scripts - I'm afraid it's a programming skill I have yet to develop.

Victor, your suggestion to provide a fully qualified path fixed the problem of the installed (Program Files (x86)...) worked as well.

As far as my chm file be ill-formed, that is quite likely. Normally Visual Studio 2010 will construct a 'well-formed' chm file with a myriad of default htm pages. I find that most or all of those default pages are not helpful for my users and so I tend to remove them (in the case of SDI or MDI with Context Sensitive Help, not necessary with a Dialog app). In any case, as I mentioned, I generally add htm pages using M$ Expression Web 3 and edit and compile the Contents and Index components with M$ HTML Workshop (a very old program). But if i don't do that, if I just let VS build the help files, no content or index components are added. NOW THERE IS SOMETHING VERY CLEARLY THAT I DON'T UNDERSTAND ABOUT HOW ONE IS SUPPOSED TO BUILD MODERN (VS 2010 +) CHM FILES WITH ALL THE NECESSARY GADGETS. VS doesn't make this easy.

February 13th, 2013, 03:58 PM

Igor Vartanov

Re: Annoying problem with F1 help

Quote:

Originally Posted by Mike Pliam

Igor, I don't see much difference between your OnMyHelp code and this one - which doesnt work (note that I cannot use '+' to concatenate strings in my code).

In any case, as I mentioned, I generally add htm pages using M$ Expression Web 3 and edit and compile the Contents and Index components with M$ HTML Workshop (a very old program). But if i don't do that, if I just let VS build the help files, no content or index components are added. NOW THERE IS SOMETHING VERY CLEARLY THAT I DON'T UNDERSTAND ABOUT HOW ONE IS SUPPOSED TO BUILD MODERN (VS 2010 +) CHM FILES WITH ALL THE NECESSARY GADGETS. VS doesn't make this easy.

Sorry, can't help you with that, as my very last case with building somewhat rich help file was done with old good WinHelp. ;)