This content has been marked as final. Show 9 replies
A CHM file uses a mapid (normally just a numerical identifier) that is passed by the application to identify the topic to display. The mapid is assigned to the topic from within RH so you would need a RH licence to assign this but....
...if you already have a decompiled CHM you could use the mapids inside the CHMs topics.
Hi Thanks for your reply. I am still a little confused though.
I decompiled the CHM and picked out the IDs from the header. I then hooked these up to my controls and used the original CHM. Would you expect this to just work in terms of want I want (right click help menu) given that the mapping information would be in the original CHM?
Again do I have to call specific RoboHelp APIs from within my application, e.g. RH_ShowHelp or the like to achieve what I want?
Sorry if these questions sound stupid but I don't have much experience in this area and, as mentioned, my google searches did not enlighten me too much.
Don't worry Peter. The area of CSH calls leaves many people confused. The problem is that it requires an application call (which most authors know nothing about) and a mapid against a help topic (which most developers know nothing about). But we'll get there.
If you have a CHM file, would you also have a map file (.h) and an alias file (.ali)? If so, this would expediate things as these are the files used by RH to produce the CHM output with the correct mapids and point the API to the correct help file topic. I don't believe that decompiling a CHM generates these. What's more I don't think the mapid association is applied to decompiled output. I certainly can't find it in a decompiled file of mine.
Thanks for you help. Yeah, I don't having the .ali file or mapping information.
So how do I find out about the API call I need to make?
Do I need to get a RoboHelp license/SDK in order to link things up?
So, you'll probably want to look at the HTML Help API documentation here:
Notice that there are a number of different API commands with which you can implement context-sensitive help, but the most widely used is probably HH_HELP_CONTEXT.
You may also find these resources useful:
See also the following articles, which describe how the map/alias functionality works within a .chm file:
To determine the context help mappings that are already set up in a .chm file, see the "Context Sensitive Help" section in this article:
Alternatively, you can use the "Test HH API" facility in FAR to retrieve the context integers from a .chm file.
FAR is free to use for two months, but then you have to pay a nominal fee to continue using it.
Thanks for all the information.
I was thinking that I needed a third-party solution to get the level of indirection that I was after, i.e. context help brings up 'help' which when clicked on brings up CHM. I had previously found info on mapping .Topics but that didn't obviously give me what I needed.
I checked out the above links but didn't really find much information relating to what I need to do.
I've now been given a CHM to work with which contains loads of stuff, including a RoboHelp generated .js file which contains a lot of popup menu code.
My existing apps UI code accommodates .Topic entries in CHMs and displays the topic information on a right-click. What I still don't understand is how do I invoke the popup menu 'help' item on a right-click in order to diaply the CHM help information?
I am starting to wonder whether I need to subclass a dialog with the relevant 'help ' string on it which then makes the relevant html help call to invoke the CHM topic.
Thanks in advance,
It sounds like you want to use the HH_TP_HELP_CONTEXTMENU command, unless I'm misunderstanding your requirements. See:
If I'm leading you up the garden path, you may want to repost your question to the microsoft.public.helpauthoring newsgroup, where your question will be picked up by one or more of the Microsoft Help MVPs with extensive programming experience. Or you could try the MSDN Developer Documentation and Help System forum.
Again thanks for the information.
Basically I'm trying to create 'What's this?' type of help for a CHM which I believe is the default for WinHelp but not for CHM files. My understanding is that 'HH_TP_HELP_CONTEXT' menu will display the .TOPIC contents within the CHM. It is also my understanding that these are plain text with no URLs allowed whereas the context menu item I want will jump, when clicked on, to open a page of the CHM in a new Window. I'll reread all of the above links that you provided to see if I've missed (more than likely) the answer to my question.