My program is written in MSVC 4.2b (yes, I should upgrade) and I want to
call the WinHelp function directly. Of all the possible parameters I am
unable to find the most elementary one: HELP_TOPIC_ID. The id of the
topic to show is know. Why do I have to set up a [MAP] section in my help
project file?
One workaround would be to call WinHlp32.exe directly with the topic as
a parameter through the -I<<topicid>> options. Why can't this be don with
the WinHelp function?
Any help would be appreciated.
----------
J. Groot Lipman
Author of Better WMF and Screen Wintab
Download a fully functional trial version at
http://leden.tref.nl/glipman.
I guess the answer is because Chairman Bill's team set it up that way.
If the mapping is a chore, why not let your author tool map all of your topics
automatically and produce a *.HH file relating the topic titles to the numbers. I think
most of them will, I know HELLLP! will.(http://www.guysoftware.com/helllp.html).
--
Ed Guy P.Eng,CDP,MIEE
Information Technology Consultant
Internet: ed_...@NOSPAMguysoftware.com remove NOSPAM from email address.
http://www.guysoftware.com
"Check out HELLLP!, WinHelp author tool for WinWord 2.0 through 8.0
and ParseRat, the File Parser, Converter and Reorganizer"
>Within my application I want to provide context-sensitive help.
>
>My program is written in MSVC 4.2b (yes, I should upgrade) and I want to
>call the WinHelp function directly. Of all the possible parameters I am
>unable to find the most elementary one: HELP_TOPIC_ID. The id of the
>topic to show is know. Why do I have to set up a [MAP] section in my help
>project file?
>
>One workaround would be to call WinHlp32.exe directly with the topic as
>a parameter through the -I<<topicid>> options. Why can't this be don with
>the WinHelp function?
>
>Any help would be appreciated.
Why not use the Context ID instead of the Topic ID? Under
MFC4.2, you could then call
WinHelp(ContextID)
Using the context ID seems a little more stable and geared
towards the application code.
Mike
------------------------------------------------------
- Mike Bandor (ban...@vitrex.net)
- Software Engineer: Delphi/Ada/C++/Java/Win3.1/
- Win95/Winhelp/JOVIAL/MASM/HTML
-
- "Trying to manage programmers
- is like trying to herd cats!"
-
- Speaking for myself! Standard disclaimer applies.
------------------------------------------------------
- Author of MEGATERMS: Military Terms and Acronyms
- http://www.vitrex.net/~bandorm/megaterm/megaterm.htm
- ftp://vitrex.net/usr/b/bandorm/m-term.zip
------------------------------------------------------
// String loaded, display it as a popup help topic
HH_POPUP hhp;
memset(&hhp,0,sizeof(hhp));
hhp.cbStruct = sizeof(hhp);
hhp.clrBackground = -1;
hhp.clrForeground = -1;
hhp.rcMargins.left = -1;
hhp.rcMargins.top = -1;
hhp.rcMargins.bottom = -1;
hhp.rcMargins.right = -1;
hhp.pt = point;
hhp.pszText = strTextPopup;
hhp.pszFont = NULL;
HtmlHelp(NULL,NULL,HH_DISPLAY_TEXT_POPUP,(DWORD)&hhp);
Mike Bandor wrote in message <369a91b9...@news.vitrex.net>...
I'm using context ID to mean the number you assign to the component in the
source code, not the the string you assign to a help topic in the #
footnote!
At its simplest, the table mentioned above has entries like this:
; Context ID/Helpfile
1=Helpfile1.hlp
10=Helpfile2.hlp
etc.
This allows you to access multiple help files without a problem (and was
necessary due to the application's strange characteristics - we've never
done this before, but used a MAP section!).
You could also alias all the context IDs for fields etc in a window to an
overview topic for that window, with entries like
30=Helpfile3
31=30
32=30
etc.
We supply the table, with an agreed file name, in plain text, and the system
reads it, so we have some control over the results i.e. whether
context-sensitive help works or not!
Our system is developed in Delphi, but the idea should be transferable to
other systems... ?
Duncan R. Bell
Jos Groot Lipman wrote in message ...
>Within my application I want to provide context-sensitive help.
>
>My program is written in MSVC 4.2b (yes, I should upgrade) and I want to
>call the WinHelp function directly. Of all the possible parameters I am
>unable to find the most elementary one: HELP_TOPIC_ID. The id of the
>topic to show is know. Why do I have to set up a [MAP] section in my help
>project file?
>
>One workaround would be to call WinHlp32.exe directly with the topic as
>a parameter through the -I<<topicid>> options. Why can't this be don with
>the WinHelp function?
>
>Any help would be appreciated.
>
> Within my application I want to provide context-sensitive help.
>
> My program is written in MSVC 4.2b (yes, I should upgrade) and I want to
> call the WinHelp function directly. Of all the possible parameters I am
> unable to find the most elementary one: HELP_TOPIC_ID. The id of the
> topic to show is know. Why do I have to set up a [MAP] section in my help
> project file?
The value for that constant is decimal 259 or hex 0x103h. Unfortunately, it
seems that particular constant is short circuited in Win98 somehow. (I'm
certain that it doesn't happen in the winhlp32.exe executable.) So you might
want to stay away from that one.
> One workaround would be to call WinHlp32.exe directly with the topic as
> a parameter through the -I<<topicid>> options. Why can't this be don with
> the WinHelp function?
Another option is to simply use the HELP_COMMAND constant with a JumpID()
macro. Fill out the macro string and pass it as null terminated string and
you should be fine.
The macro takes the parameters:
JI(`helpfile.hlp[>wintype]',`topic_id')
make sure to use the open and closing single quotes or to replace with
double quotes. [>wintype} is optional for specifying a specific window type
for the topic to be displayed in.
Paul
_______________________________________________________________
Paul A. O'Rear
Sageline Software 717.432.8424 Fax: 410.465.1812
http://www.sageline.com
WUGNET/Help Authoring Forum - Sysop for: Under The Hood Section
email: p...@sageline.com or por...@compuserve.com
Tue, 12 Jan 1999 14:32 EST