Anyone done context-sensitive HTML help?

36 views
Skip to first unread message

Tim Witort

unread,
Jul 30, 2001, 12:59:53 PM7/30/01
to
I posted this a while back and got no replies, so I'll
try again...

Our company has had an HTML help system developed by an
outside shop. They delivered to us the compiled help file
"ourhelp.chm" and a couple of text files. One text file
(the "alias" file) numbers each html file name within the
CHM file like so:

1=Introduction.htm;
2=Ch1_Intro.htm;
3=System_Overview.htm;
4=System_Features.htm;
5=System_modules.htm;
...

The other text file (the "map" file) apparently maps these
numbers to the actual IDs in the CHM file:

#define IDH_1 1000
#define IDH_2 1001
#define IDH_3 1002
#define IDH_4 1003
#define IDH_5 1004
...

I was under the (misguided) assumption that all I needed
to do was:

SET HELP TO ourhelp.chm

Then drop the context IDs into the forms' HelpContextID to
have F1 bring up the associated topic. Not so. Neither the
1, 2, 3... numbers nor the 1000, 1001, 1002... do anything.
Setting the HelpContextID of a form or control to either of
these and pressing F1 causes nothing at all to happen. No
error, no help file, nothing. If I hit F1 when there is *no*
HelpContextID set, it brings up the help file, but it is just
displaying the Contents. Getting the HelpContextID property
to bring up the related topic is not happening.

I've read all of the past postings on HTML help in here
and there is no definitive answer to the process of getting
this to work. The August 1998 article in FoxPro Advisor
talks about developing HTML help in the HTML Help Workshop,
but doesn't talk much about integrating with an application.

So do I have to install something special on my machine?
I have IE5 installed. Are there additional things needed
to get the HelpContextIDs working?

Thanks for any insights,
-- TRW
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________

Trey Walpole

unread,
Jul 30, 2001, 3:38:08 PM7/30/01
to
Maybe the help file itself isn't working correctly.

If you try it directly in the command window does it work?
e.g.

SET HELP TO ourhelp.chm
HELP ID 1000

You can also use the HTML Help Workshop to test it.
e.g.

Download the HTML Help Workshop from MS ( if you haven't already) at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/ht
ml/vsconhh1start.asp

Run it.
Under the Test menu, select HtmlHelp API
Under Compiled file, select the ourhelp.chm
Under Command, select HH_HELP_CONTEXT
Under Map number, enter 1 or 1000 (or try each at different times)
Click Test

If it doesn't find it, the chm file is not working.

--
Please respond to the newsgroup so that all may benefit from the discussion.
<trw7atixdotnetcomdotcom (Tim Witort)> wrote in message
news:Xns90EE5B3699D8At...@198.99.146.18...

Gary Brueggeman

unread,
Jul 31, 2001, 12:47:11 PM7/31/01
to
No wonder you need help. The help workshop reminds me that you get what you
pay for. I think you are very close to having this work. In your alias
file, you need to set up the relationships as follows:
IDH_1=Introduction.htm
IDH_2=Ch1_Intro.htm
IDH_3=System_Overview.htm
IDH_4=System_Features.htm
IDH_5=System_modules.htm
I actually set up these alias's under the alias section of the HHP. I only
assume that the file will work as well.

<trw7atixdotnetcomdotcom (Tim Witort)> wrote in message
news:Xns90EE5B3699D8At...@198.99.146.18...

Tim Witort

unread,
Aug 1, 2001, 12:06:56 PM8/1/01
to
Thanks for the testing idea, Trey. I do have Help Workshop
installed, so I can give it a shot.

-- TRW

Trey Walpole seemed to utter in news:OMtkq8SGBHA.736@tkmsftngp07:

> Maybe the help file itself isn't working correctly.
>
> If you try it directly in the command window does it work?
> e.g.
>
> SET HELP TO ourhelp.chm
> HELP ID 1000
>
> You can also use the HTML Help Workshop to test it.
> e.g.
>
> Download the HTML Help Workshop from MS ( if you haven't already) at
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhel

> p/ht ml/vsconhh1start.asp

--

Tim Witort

unread,
Aug 1, 2001, 12:08:05 PM8/1/01
to
Thanks, Gary (also for the email). We'll see if fiddling
in the workshop yields some results.

-- TRW

Gary Brueggeman seemed to utter in news:kiB97.15$bh1....@nnrp1.sbc.net:

--

Tim Witort

unread,
Aug 1, 2001, 2:54:04 PM8/1/01
to
Are you saying the company that made this for us has the
indexing setup wrong? Since this has been outsourced, I
can't make any fixes myself, I can only instruct the third
party if there are problems. I can learn all about how
to build HTML help files if need be, but since I have tons
of VFP development to do, I was hoping not to have to get
too deep into this.

So, if they have not setup the indexing right, are you saying
that the alias file should look like your sample?:

IDH_1=Introduction.htm
IDH_2=Ch1_Intro.htm
IDH_3=System_Overview.htm
IDH_4=System_Features.htm
IDH_5=System_modules.htm

What about the map file? (I don't even know if I'm using
the right terms here...) How does one get from the above
to a context ID that can be put into VFP's HelpContextID
property?

I apologize for needing additional clarification, I'm just not
an HTML Help developer...

thanks,
-- TRW

Gary Brueggeman seemed to utter in news:kiB97.15$bh1....@nnrp1.sbc.net:

> No wonder you need help. The help workshop reminds me that you get

--

LTDaveCass

unread,
Aug 3, 2001, 10:50:05 AM8/3/01
to
Tim,

I've never set up aliases, so I'm not able to give you advice on why your exact
files aren't working. I've always put the actual html filename and help
context id directly into the header file. My header files look like this:

#DEFINE PUBLISHER\SEARCH\MODEL\PUBLISH\MODEL 251
#DEFINE PUBLISHER\SEARCH\DATESTAB\PUBLISH\DATESTAB 260
#DEFINE PUBLISHER\SEARCH\RECEIPT\PUBLISH\RECEIPT 261
#DEFINE PUBLISHER\SEARCH\STUFF\PUBLISH\STUFF 262
#DEFINE PUBLISHER\SEARCH\LIFT\PUBLISH\LIFT 263
#DEFINE PUBLISHER\SEARCH\DELETE\PUBLISH\DELETE 264
#DEFINE PUBLISHER\SEARCH\CHANGE\PUBLISH\CHANGE 265

I've never had a problem.

Unfortunately, if you don't have the source files, you're out of luck with
experimenting. Because the header file is interpreted when the chm file is
compiled. Fox doesn't look at it.

One more tip on the header file, HTML Help workshop must have a tab between the
file name and the ID. It doesn't interpret the file correctly if you have a
space instead.
David B. Cass
U.S. Navy, FISC Norfolk, VA

Tim Witort

unread,
Aug 3, 2001, 1:14:19 PM8/3/01
to
We have a winner!!!!! David had the secret!

Using David's technique, the context sensitive HTML Help works
like a charm. To be a little more specific about what is done
to make this work:

In HTML Help Workshop (HHW), with your project opened, the left
hand panel (usally at the bottom) will have two headings:
[ALIAS] and [MAP]. This is where HHW shows how you are mapping
your help topics to context IDs for use from an outside program.
Double-clicking either of these headings brings up the
HTMLHelp API Information dialog box. This is where you assign
context IDs.

If you don't see the [ALIAS} or [MAP] headings, you'll need to
open the HTMLHelp API Information dialog box by clicking on the
"HTMLHelp API Information" button in the toolbar (has an icon
of an arrow pointing to a line - ain't that an informative icon?).

In the HTMLHelp API Information dialog box there are three
tabs. The first one is what we need to focus on - Map.

Write an include file using the format David shows with each topic
and context ID entered like so:

#DEFINE <html file name without the extension> <TAB> <context ID>

If the HTML files in your project are in subdirectories under
your HTMLHelp project directory, you need to include the path
to each HTML file in the above. All of my HTML files are in
the same directory as the project file, so my include file
looks like this:

#DEFINE Introduction 1
#DEFINE Ch1_Intro 2
#DEFINE System_Overview 3
#DEFINE System_Features 4
#DEFINE Documentation_syntax_conventions 6
#DEFINE Importing_files 7
#DEFINE Windows_conventions 8
#DEFINE system_requirements 9
#DEFINE Ch2_Install 10

It is important *not* to have the ".htm" extension on the
file names in this include file. If you include the extension,
it doesn't work.

Now, back to the HTMLHelp API Information dialog box in the
HHW... On the Map tab, click the "Header File..." button to
identify the include file you wrote as described above. Then
Click "OK" to close the HTMLHelp API Information dialog box.

Compile the file into the CHM file.

Now, in VFP, doing the following will actually bring up the
correct topic in the CHM file:

1) Open one of your forms in the Form Designer

2) Set the HelpContextID of the form to one of the numbers
in your include file. In my case, if I want to bring up
the "Windows conventions" topic, I'd enter an 8.

3) Save the form

4) In the command window, run the following command to point
VFP to your help file:

SET HELP ON
SET HELP TO myHelp.chm

Of course replace "myHelp.chm" with whatever and wherever
your compiled CHM file is stored.

5) Run the form that you modified in (1). And press F1.
Tadaaa!!! The topic will open up. (or should)

Will you find this information in the help for the HTMLHelp
Workshop? No. Will you find it in VFP's help? No. But
now you know.

Thanks to everyone who contributed bits and pieces to getting
this to work.

-- TRW

LTDaveCass seemed to utter in
news:20010803105005...@mb-md.aol.com:

--

Reply all
Reply to author
Forward
0 new messages