Re: Context-sensitive help - HTML help and VB application (Long Answer)

Subject: Re: Context-sensitive help - HTML help and VB application (Long Answer)
From: Alan -dot- Miller -at- prometric -dot- com
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Thu, 5 Apr 2001 15:59:44 -0400


Alyssa:

Microsoft makes it very easy to call HTML Help (*.chm) from VB 6. The
Properties for each Form allows the developer to call a specific help topic
by context ID number. He can assign this to a "Help" button or F1 or both.
Each Form in the user interface can have a different topic assigned to it.
It takes a bit of coordination between you and the developer to assign ID
numbers (these can be decimal or hex) to the topics and Forms. Before you
compile the HTML Help, there are some things you have to do so this will
work.

First, you must create or modify a "map" file, which is where you assign
topic ID numbers to specific topics. The "map" file is actually a C header
file that the Help Compiler uses when compressing all the *.htm files into
one *.chm. It is a plain text file containing a #define statement for each
topic in your help system. It looks like this:

#define TopicTheFirst 1
#define TopicTheSecond 2

Each statement includes a text identifier (topic ID string) followed by the
context ID number. You can give the topic any name you wish as long as 1)
it's unique (for the help system), 2) it only contains alpha-numeric
characters plus periods and underscores (no other characters are allowed),
and 3) the id string does not exceed (I think) 256 characters. The numbers
you and the developer assign can either be decimal (base 10) or hexadecimal
(base 16). Decimal numbers are simply entered as digits (with no leading
zeros). Hex numbers are entered as "0x000" (without quotes). You can use
either, but not both. You must name the map file with a .h extension and
the file name must include "map" as the last three characters before the
.h. For example: mymap.h.

Second, your project must include an "alias" file. This is another C header
file. Like a map file, it is a plain text file. It assigns each topic to
its *.htm file. The Help Compiler uses this file, along with the map file,
when compiling the *.chm to keep all your topics, files, and IDs straight.
The alias file contains a line for each topic and each file in your help
project:

TopicTheFirst=./htm/MyFirstTopic.htm ; Some useful comment
TopicTheSecond=./htm/MySecondTopic.htm ; Another useful comment

Notice how each line is actually an identity statement. The first part is
the topic ID string you used in the map file, followed by an "=", then the
file name you assigned to the topic *.htm file. Note that this is a
relative path to the *.htm and that you should use forward slashes (/)
where you would use back slashes (\). If you feel the need to add useful
information for future generations, you can do this by adding a semi-colon
(;) followed by the comment. You name this file just like you did the map
file, except you use "alias" in place of "map".

Are we done yet? Nope. we still have to tie all this together so the Help
Compiler knows what to do with this stuff. you do that with the project
file (*.hhp). This is another plain text file. It looks just like an *.ini
file, and is used by the Help Compiler just like it were one. So, your last
step is to add #include statements in the [Alias] and [Map] sections of the
*.hhp:

[Alias]
#include .\myalias.h

[Map]
#include .\mymap.h

For more about HTML Help, I recommend _Official HTML Help Authoring Kit_,
by Steve Wexler (Microsoft Press, 1998, ISBN 1-57231-603-9).

Now aren't you glad you asked? There is much more, but this should get you
started down the right path.

Cheers,
Al Miller
Chief Documentation Curmudgeon
Prometric, Inc.




Alyssa Fox <a -dot- fox -at- pentasafe -dot- com>@lists.raycomm.com on 04/05/2001 11:44:59
AM

Please respond to Alyssa Fox <a -dot- fox -at- pentasafe -dot- com>

Sent by: bounce-techwr-l-40429 -at- lists -dot- raycomm -dot- com


To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
cc:

Subject: Context-sensitive help - HTML help and VB application

Hello everyone,

I am faced with the task of creating context-sensitive help for a Visual
Basic application. I am using FrameMaker and WebWorks Publisher to convert
the Frame files to HTML files. I want a strict HTML help system. A
developer
and I have been arguing over whether or not it's possible to create a
context-sensitive HTML help system with a VB application.

A couple of questions:

1. Is it possible to create a context-sensitive help system using HTML Help
(converted from Frame files by WebWorks)? Have any of you ever done this?

2. If it is possible, I wouldn't think it's more than a simple case of
matching topic IDs in the code and in the Frame files. Am I mistaken?

Thanks for all your help,
Alyssa

Alyssa Fox
Technical Writer
PentaSafe Security Technologies, Inc.
713-523-1992 ext. 9695
http://www.pentasafe.com



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available 4/30/01 at http://www.devahelp.com or info -at- devahelp -dot- com

Sponsored by DigiPub Solutions Corp, producers of PDF 2001 Conference East,
June 4-6, Baltimore, MD. Now covering Acrobat 5. Early registration deadline
April 27. http://www.pdfconference.com.

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: Re: Would you like a fries with that style guide, redux
Next by Author: RE: The Engineer's Iron Ring
Previous by Thread: Tools: Recent comparison of Help authoring tools?
Next by Thread: Having Your Style Guide and Eating Your Fries Too


What this post helpful? Share it with friends and colleagues:


Sponsored Ads