Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HH_HELP_CONTEXT and MAP Section

488 views
Skip to first unread message

Chip Pearson

unread,
Aug 31, 2006, 9:49:38 AM8/31/06
to
I'm using the HTMLHELP API function to work with CHM Help files in my
application. I've subclassed the form to detect the WM_HELP message. When my
form receives this message (user hits F1), I execute the code:

Result = HtmlHelp (0&, App.HelpFile, HH_HELP_CONTEXT,
Me.ActiveControl.HelpContextID)

where the HelpContextID for the control is 1000.

When the code runs, I get an error message from "HTML Help Author Message"
that states "HH_HELP_CONTEXT called without a [MAP] section."

My Help project does indeed have a [MAP] section.

In the Help project, I have a text file named PopupTopics.txt which contains
text like:

.topic IDH_RegistryValueName
This is some help text to popup about the Registry.


I have a file named Alias.h which contains text like

IDH_RegistryValueName=RegistryName.htm
IDH_RegistryValueValue=RegistryValue.htm
IDH_IgnoreMissongAttacmentFiles=IgnoreMissongAttacmentFiles.htm
IDH_CDOServerName=CDOServerName.htm

I have a file named ctxhelp.h with contains text like

#define IDH_RegistryValueName 1000
#define IDH_RegistryValueValue 1010
#define IDH_IgnoreMissongAttacmentFiles 1030
#define IDH_CDOServerName 1040

In the MAP section of my HTML Help Project, I have
#include Alias.h
#include ctxhelp.h
listed in the Map tab.

In the Text Pop-ups tab, I have
PopupTopics.txt

In the Alias tab, I have
1000=RegistryName.htm
1010=RegistryValue.htm
Error_1=Error_1.htm

What am I missing, and why do I get the error message?

Thanks for any help you can provide.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)


Pete Lees [MVP]

unread,
Aug 31, 2006, 11:52:02 AM8/31/06
to
Chip,

> I'm using the HTMLHELP API function to work with CHM Help files in my
> application. I've subclassed the form to detect the WM_HELP message. When my
> form receives this message (user hits F1), I execute the code:

> [...]


> When the code runs, I get an error message from "HTML Help Author Message"
> that states "HH_HELP_CONTEXT called without a [MAP] section."

> [...]

I think you just need to reorganise the ALIAS and MAP sections of your
project file, like this:

[ALIAS]
#include Alias.h

[MAP]
#include ctxhelp.h

That should fix the problem (because the correct alias strings are now in
the ALIAS section rather than the MAP section).

Pete

Ulrich Kulle

unread,
Aug 31, 2006, 1:22:01 PM8/31/06
to
Hello Chip,

> When the code runs, I get an error message from "HTML Help Author Message"
> that states "HH_HELP_CONTEXT called without a [MAP] section."
>
> My Help project does indeed have a [MAP] section.

adding to Pete's comment, I think this could be interesting for you:
http://www.help-info.de/en/Visual_Basic_Applications/vba.htm
Topics:
http://www.help-info.de/en/help_info_htmlhelp/hh_api.htm#vba
http://www.help-info.de/en/Help_Info_HTMLHelp/hh_context-id.htm
http://www.help-info.de/en/Visual_Basic_Applications/vba_using_example.htm

See download section!

HTH
Best regards
Ulrich Kulle
***************************************
http://www.help-info.de
***************************************


0 new messages