This document describes using the ActiveX Html Help Control to link two help-files.
After that I describe a method to implement this from within XML documentation
in a C# file with the help of NDOC and an extensibility style sheet.
To create a link to an external compiled help-file, we can use the shortcut
command from the ActiveX Html Control.
To try this , use HTML Workshop and insert a ActiveX Html Control in your
html-file:
As a result, this is placed in your html file:
<OBJECT id=MyId type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="hhctrl.ocx#Version=5,2,3790,309">
<PARAM name="Command" value="ShortCut">
<PARAM name="Item1" value=",hh.exe,MyOtherHelpFile.chm::/main.htm">
</OBJECT>
It defines a ActiveX Html Control object that is able to call "hh.exe" with
parameter "MyOtherHelpFile.chm::/main.htm".
To place a hyperlink in your Html code that jumps to the other help file you can
use use:
<a href="JavaScript:MyId.Click()">Go to my other help file</a>
Okay, that works.
Now how do we accomplish this from within XML documentation in a C# file?
When you don't know what XML documentation in C# is, please refer to "XML documentation" in MSDN.
Of course, we don't want to add the <OBJECT> ...</OBJECT> part directly into
our C# file, that would make it unreadable.
What we do want is something like this:
///<externalHelp HelpFile="MyOtherHelpFile.chm::/main.htm" HelpObject="MyId"/>
...to create the ActiveX Html Control Object
and this...
///
For a description of the user-interface, see <externalHelpRef HelpObject="MyId">Go to my other help file</externalHelpRef>...to define the jump.
We can accomplish this by using this extensibility style-sheet:
<OBJECT id="
]]>
" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" > <PARAM name="Command" value="ShortCut" /> <PARAM name="Item1" value=",hh.exe,
]]>
<a href="JavaScript:
]]>
.Click()">
]]>
</a>.<br/>
]]>