TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:RE: CHM: Calling up F1 Topic: Map ID vs. Keyword From:Pete Lees <pd -dot- lees -at- btinternet -dot- com> To:techwr-l -at- lists -dot- techwr-l -dot- com Date:Thu, 6 Mar 2008 11:18:29 +0000 (GMT)
Keith,
> In one of our applications, we use a CHM as the
> Help file. In the application, when the user clicks
> in the Address text box (for example) and presses
> F1, a Help topic describing that text box appears.
> In the past, I've always seen Map IDs used to call
> up such F1 topics. However, there is apparently
> another way to do this:
Yes, that's right. A developer who uses the HTML Help
API to connect a .chm file to an application can
choose from a number of different commands for
invoking context-sensitive help. The two principal
ones are HH_HELP_CONTEXT, which opens the topic that
is mapped to the specified context integer, and
HH_DISPLAY_TOPIC, which opens the topic with the
specified file name. For an example of the latter, see
Microsoft's HTML Help API Reference:
In .NET applications, developers typically use
"HelpProvider" components to invoke context-sensitive
help, but the same options are available here too.
(HelpProviders are essentially just wrappers for the
HTML Help API.) See the following page for code
samples:
This page is a little out-of-date, because the
statement at the beginning about .NET applications not
supporting help calls that use numeric context IDs is
no longer true. Microsoft added a method for doing
this in .NET 2.0.
> Apparently, the HTM file is somewhere embedded
> within the CHM(?!), and the Address.htm topic can
> be located and then opened.
Although the two aren't completely analogous, you can
think of a .chm file as resembling a .zip file -- a
container for a multitude of smaller files. In fact,
you can examine the contents of a .chm file with a
freeware utility like KeyTools
(http://www.keyworks.net/keytools.htm) and see all the
source files.
I like your summary of the pros and cons of using file
names and context integers to invoke context-sensitive
help. Off the top of my mind, I can't think of a
compelling reason to use the file names.
Pete
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create HTML or Microsoft Word content and convert to Help file formats or
printed documentation. Features include support for Windows Vista & 2007
Microsoft Office, team authoring, plus more. http://www.DocToHelp.com/TechwrlList
True single source, conditional content, PDF export, modular help.
Help & Manual is the most powerful authoring tool for technical
documentation. Boost your productivity! http://www.helpandmanual.com
---
You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-