6 Replies Latest reply on May 8, 2008 2:38 AM by RoboColum(n)

    hlp TO CHM including CSH

      the product that i work on is shipped with A chm (Help menu” and a HLP (for context sensitive help). I need to first convert the HLP to CHM, and then integrate the CSH into the CHM. I have converted HLP to CHM but not to sure about how to go forward. Also what inputs would I require from the developers and at what stage to accomplish this task?

      Would really appreciate some pointers on this task.

        • 1. Re: hlp TO CHM including CSH
          RoboColum(n) Level 5
          Hi MULDER595.

          I'd start talking to your developers now if you haven't already as their input is vital to ensure a smooth change over. The call from the application must be changed if you are changing from a HLP to a CHM file.

          There are two ways to handle CSH. Both require a map file and an alias file but differ of who produces them. Most of us here prefer to create these ourselves and provide these to the developers. You can use RHs own inbuilt CSH tool to produce these but a better way is to create them yourself using a text editor. This may sound scary but is really very easy.

          The basic premise is that the map file contains an identifier and an alias. The alias file contains the alias and the topic to which it is attached. When you attach a mapid to a topic it is used by the application (via the map file) to identify the alias which in turn identifies (via the alias file) which topic to open.

          Hope this makes sense. Please feel free to come back with any more specific questions.
          • 2. Re: hlp TO CHM including CSH
            MULDER595 Level 1
            Hi Colum,

            Thanks for replying.

            Most of what you have said makes a whole lot sense to me. Correct me if I am wrong here:

            1. I ask the dev guys to tell me the call from the application, so that I may suggest the appropriate option?
            2. Ask them for existing map file and an alias

            Any good tutorial where I could learn how to create a map file and an alias, by hand and not using RH's built-in tool.

            Thanks once again.
            • 3. Re: hlp TO CHM including CSH
              Pete Lees Level 2

              See these pages for information on how to hand-craft the map and alias files:


              In general, though, you shouldn't need to change the existing context integers and topic IDs just because you're moving from WinHelp to HTML Help. So long as the developers change their WinHelp API calls to HTML Help API calls, and you configure your .chm file appropriately, the existing values will work.

              In fact, Microsoft modelled the HTML Help API on the WinHelp API to simplify the process of updating existing applications from WinHelp to HTML Help. For example, a typical WinHelp API command is:

              WinHelp(HWnd, "helpfile.hlp", HELP_CONTEXT, 1001)

              The HTML Help API equivalent is almost the same:

              HtmlHelp(HWnd, "helpfile.chm", HH_HELP_CONTEXT, 1001)

              For information for developers on how to call an HTML Help file from an application, see these pages:


              • 4. Re: hlp TO CHM including CSH
                MULDER595 Level 1
                One last question, for now the developers need to give me the map files and aliases they';re currently using?

                • 5. Re: hlp TO CHM including CSH
                  RoboColum(n) Level 5
                  Not quite. You don't actually need to know what the call from the application is. You just need to know there will be one. Your developer will have to change the help call though as the syntax differs between HLP and CHM files.

                  As I said, there are two ways of producing the map/alias files. The developers can produce them or you can. If they have done this in the past then go ahead and get them as they will be useful. However I suggest you change things and produce them yourself in the future. From my experience it makes the process a lot easier if you have control over the process That said it is key that communication with the developers is maintained to avoid problems.

                  As far as a "good tutorial", there is precious little over and above what I have provided. The problem with it is that the method used to provide CSH differs widely dpending on the type of output and the application itself so over and above the basics it is hard to cover all the bases.
                  • 6. Re: hlp TO CHM including CSH
                    RoboColum(n) Level 5
                    The existing map and alias files would certainly be useful in identifying where there are existing help calls so you can mirror these in your CHM.