• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CHM Context Help Where to Start

New Here ,
Nov 16, 2008 Nov 16, 2008

Copy link to clipboard

Copied

OK I am not a technical author and have no help file creation experience, however I need to do the following:

Within a C/C++ Windows application provide context help whereby a right click on a control brings up the context menu item 'Help' which when selected brings up the appropriate CHM pane.

Now I've decompiled a third-party CHM file which provides such functionality and noted that it contains some RoboHelp generated Javascript (that info brought me here) for pop up windows and so forth.

Now my application does support context help in terms of right-clicking brings up the CHM topic (via .Topic in CHM) so I kind of hoped that I could just slot in the CHM file mentioned above and it would work. Obviously I was being too hopefull so now I am at a loss to what I need to do.

Questions:

1) If I were to use a CHM file which contained such RoboHelp generated Javascript then would I need to purchase RoboHelp in order to link with a relevant library so that I could make an API call in order for the magic to work.
2) Is there another way of using the above CHM? HTML Help APIs?
3) Alternatives?

Apologies if this is the wrong place for such a question but extensive googling doesn' throw up too much.

Thanks,

Peter.

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

Hi Peter.

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

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.

Many thanks,

Peter.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

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?

Cheers,

Peter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

Hi, Peter,

There is no need to use a RoboHelp-specific API or JavaScript to implement context-sensitive help in your application. Microsoft has an extensive and well-documented API with which HTML Help files may be connected to applications, and there is therefore no need to reach for a third-party solution.

So, you'll probably want to look at the HTML Help API documentation here:

http://msdn.microsoft.com/en-us/library/ms670068(VS.85).aspx

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:

http://www.smountain.com/m_ProgrammingHelp.htm
http://frogleg.mvps.org/helptechnologies/htmlhelp/hhmfc.html
http://helpware.net/FAR/far_faq.htm#CPP

See also the following articles, which describe how the map/alias functionality works within a .chm file:

http://www.help-info.de/en/Help_Info_HTMLHelp/hh_context-id.htm
http://frogleg.mvps.org/helptechnologies/htmlhelp/hhtutorials.html#mapping

To determine the context help mappings that are already set up in a .chm file, see the "Context Sensitive Help" section in this article:

http://www.grainge.org/pages/authoring/reverse_engineering/reverse_engineering.htm

Alternatively, you can use the "Test HH API" facility in FAR to retrieve the context integers from a .chm file.

http://helpware.net/FAR/index.html

FAR is free to use for two months, but then you have to pay a nominal fee to continue using it.

Pete

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2008 Nov 17, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 19, 2008 Nov 19, 2008

Copy link to clipboard

Copied

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,

Peter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 19, 2008 Nov 19, 2008

Copy link to clipboard

Copied

Hi, Peter,

It sounds like you want to use the HH_TP_HELP_CONTEXTMENU command, unless I'm misunderstanding your requirements. See:

http://helpware.net/htmlhelp/how_to_whatsthis.htm#api
http://msdn.microsoft.com/en-us/library/ms670095(VS.85).aspx

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.

Pete

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 20, 2008 Nov 20, 2008

Copy link to clipboard

Copied

LATEST
Hi Pete,

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.

Cheers,

Peter..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp