Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi, psk,
At first glance, the syntax of the help call appears to be wrong. If you want to pass a context integer (aka "map number") to the help file then you need to use an HH_HELP_CONTEXT command, like this:
HtmlHelp(this.Handle, <<path to help file>>, HH_HELP_CONTEXT, 1292);
Alternatively, if you want to use an HH_DISPLAY_TOC command, you need to specify the file name of the required topic as one of the parameters. For example:
HtmlHelp(this.Handle, "c:\\TargetHelpFile.chm::/targetTopic.htm", HH_DISPLAY_TOC, NULL);
Pete
Copy link to clipboard
Copied
Thanks, Pete... I have made some progress but not there yet:
If I use the below mentioned URL, how do I provide the <<path to help file>> for a merged help topic:
HtmlHelp(this.Handle, <<path to help file>>, HH_HELP_CONTEXT, 1292);
The parent is BPMDocumentation.chm.
The child project is DesginerUserGuide.chm (besides others.)
To access a topic in the child project, I have tried these in the <<path to help file>>:
BPMDocumentation.chm::/redirect.htm#DesignerUserGuide.chm::/Overview/components.htm
BPMDocumentation.chm::DesignerUserGuide.chm
BPMDocumentation.chm::/DesignerUserGuide.chm
However, they do not launch the help file.
The topics in parent can be invoked without a probem.
The only way I could lauch child project topic was using this code:
HtmlHelp(
this.Handle, "BPMDocumentation.chm::/redirect.htm#DesignerUserGuide.chm::/Overview/Components.htm", HH_DISPLAY_TOC, 1292);
However, the problem with this kind of invoking is that, I cannot move to another topic in the merged help file unless I close the existing instance of the merged CHM file.
I could get atleast this far thanks to your suggestions here about the redirect.htm:
http://forums.madcapsoftware.com/viewtopic.php?f=12&t=6463&p=44957
Copy link to clipboard
Copied
Hi, psk,
For HH_HELP_CONTEXT commands, I believe that you have two options:
Pass the help calls directly to the child .chm files instead of feeding them through the parent. So, a typical command would look something like this:
HtmlHelp(this.Handle, c:\\DesignerUserGuide.chm, HH_HELP_CONTEXT, 1292);
Then you would change the project settings of each child help file so that all the other .chm files in the collection are merged into it. This allows the user to view the consolidated index from any child .chm file, and conduct searches across all the files. See the section called "Step 2 - The [MERGE FILES] statement" in this article:
http://helpware.net/htmlhelp/how_to_merge.htm
In addition, you would change the window properties of each child .chm file so that the TOC displayed is that of the parent. See the section called "Step 3 — Slave Windows Definitions" in the article above.
http://helpware.net/htmlhelp/how_to_merge_ctx2.htm
This requires you to define all the context help mappings for the child files within the parent help file. It's a complicated solution, but it does work.
As far as the HH_DISPLAY_TOC command is concerned, can you say a little more about the problem you encountered ("I cannot move to another topic in the merged help file unless I close the existing instance of the merged CHM file")? Is this because only the TOC, index and search of the slave .chm file are accessible — in which case the techniques mentioned above should help ("Step 2 - The [MERGE FILES] statement" and "Step 3 — Slave Windows Definitions")?
If you're willing to send me your parent and child help files, I'd be more than happy to take a look and try to come up with more suggestions.
Pete
Copy link to clipboard
Copied
Many thanks, Pete.
Following step 2 of your instructions solved the problem. Using this mapping process means that it requires regular maintenance work with RH files whenever a new topic and corresponding map ID is created. But atleast it is a solution that works!
(There are few other issues that seem to bother me with merged help but they don't obviously fit in this topic. I will raise a different topic for it.)