Navigation: More Advanced Procedures > Working with Modular Help Systems Links and search in runtime CHM |
Scroll Prev Top Next More |
When you create runtime-merged modular CHM help systems there are two key issues that you need to consider for the proper integration of the modules:
•How to manage calls to topics in the child CHM modules
•How to ensure that search works in all the CHM modules
The Microsoft CHM system cannot automatically route your help calls through the master module to the child modules. When you call a topic in a child module you have to make the call to that CHM file, in exactly the same way as if it were a normal, independent CHM. There is no problem there. You just need to know that you make the calls to the child CHM module directly and it will work. However, if you don't configure the CHM correctly, a call to the child CHM will only open that CHM. The user won't see the TOC of the merged CHM system, and that isn't what you want. You need to tell the CHM viewer that you want the full TOC from the master. 1.Open the child module project in Help+Manual and in the Project Explorer navigate down to Configuration > Publishing Options > Microsoft HTML Help > Extended .HHP Options. 2.On the lower right, check the settings under the heading If this is a child file merged at runt time... 3.Select Table of contents of the master file: and enter the name of the master CHM that is going to be used in your runtime modular help system. This file name should not contain any spaces. 4.Repeat this for all the projects for your CHM child modules. |
When the user opens the help from the master module, either directly or with a call from your software, search will always include all the modules in the runtime help system. This is because Help+Manual automatically includes references to all the available child modules in the master, and if they are there then they will be searched. This cannot be done automatically in the child modules. They are just independent help files, and normally they don't and can't know anything about the other modules. If you make a call to a child file the search will then only be performed in that file's topics unless you tell the CHM system that you also want to search in the other modules. Like displaying the TOC of the master, this is also something that you configure in the Extended .HHP Options: 1.Open the child module project in Help+Manual and in the Project Explorer navigate down to Configuration > Publishing Options > Microsoft HTML Help > Extended .HHP Options. 2.In the Additional settings for the HHP file: box enter this heading on the first line (see screenshot below): 3.Then enter the names of all the other CHM files in the modular runtime system, including the master file. Enter one file on each line, like this: 4.Repeat steps 1-3 for all the projects for your CHM child modules. Note: Always include all the modules that might ever be used in the runtime help system. It is fine for modules that are not present to be listed. If they are not found they will just be skipped without an error. ![]() |
When using runtime merging it is advisable to define a global "window name" for all the projects in the modular help system. This improves the performance of links to your help from your applications. When you define a global help window, all calls to the help system will open in the same CHM help viewer. Without a global window, you will get additional help viewers opening when calls are made first to one module and then to another. The global help window option is set in Configuration > Publishing Options > Microsoft HTML Help > Help Windows. You need to set the same global window name in all projects in the modular help system, including the master project. If you use this option the global help window name must begin with $global_, followed by an identifier consisting only of alphabetic characters. You must use the same global name in all the projects. Examples of valid global window names: $global_main_mycompany Important – make sure your window name is unique! Don't use the standard $global_main name! If you do it is quite possible that some other software on the user's computer will also be using that name and then your help could open in their help window! |