Hello,
I created a chm file with two windows and I would like to know how to open a topic with a secondary window. I use ShowHelp with vb.net.
thanks for the help
chm and secondary window
Moderators: Alexander Halser, Tim Green
- Alexander Halser
- EC-Software Support
- Posts: 4098
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: chm and secondary window
I am not absolutely sure which parameters ShowHelp in VB takes. If you can specify a topic page in the form "mytopicname.htm" (with the explicit extension .htm), it should work by adding a ">" and the name of the secondary help window.I would like to know how to open a topic with a secondary window. I use ShowHelp with vb.net.
The raw HTML Help API has 4 parameters:
HtmlHelp(aHandle, aCommandString, aCommand, aData);
aHandle = the window handle of the calling form
aCommandString = the help file name including path and, optionally, the topic to display
aCommand = one of the HTML HELP API commands, for instance: HH_DISPLAY_TOPIC
aData = in most cases zero, for context sensitive calls, it might contain the numeric context ID
Example:
Code: Select all
HtmlHelp(Handle, 'c:\mydata\mychm.chm::thistopic.htm>SecondaryWin', HH_DISPLAY_TOPIC, 0);
The VB ShowHelp command might encapsulate this raw API and hide some detail. If Showhelp takes the full topic page name including .html extension, you can easily add the secondary window to that string. However, if ShowHelp takes only the page name without extension and adds the ".htm" by itself, you are probably out of luck. Try to use the raw HtmlHelp() API command instead.
Please note that you must enable secondary windows in Help+Manual. Make sure that H&M really creates the CHM file with secondary window definitions. By default, it doesn't because those multiple help windows in CHM files are merely a legacy from the past. They are less and less used in help systems.
You do not have the required permissions to view the files attached to this post.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH