See also: A series of Security Updates have stopped many HTML Help features from working on the local PC and on servers.
This page contains information on Microsoft HTML Help and HH Workshop (SDK). HTML Help Compilation
HTML Help Viewing
Toolbar Buttons
General Information
|
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTML Help] Name = myfile.chm Data = "c:\chmfolder\" |
Or use HH.INI. You do not need to reboot a Win95 machine for the registry to work. The primary advantage of the hh.ini file is that you can add a prompt to tell the user something should the file not be found. That's particularly useful if the CHM file is on a CD-ROM and you need to tell the user to insert a specific CDROM disk. The format is identical to the WinHelp.ini file. The following docs are taken from the hcw.hlp file and modified for HTML Help:
[FILES] HLP-filename=path, message |
Example: The following entry instructs Help to look in the \Product\Files folder on drive P for the Notepad Help file. If necessary, Help will prompt the user to insert a CD into the drive:
[FILES] Notepad.chm=P:\Product\Files, Please insert your Windows 98 CD into drive P. |
Shortcut Fix: #2 From Mr Wizard "Rainer H. Rauschenberg" <rainerh AT wiwi.uni-frankfurt.de>
Rainer builds the full path to the external file using some cleaver script. Thanks Rainer:
<SCRIPT LANGUAGE="JavaScript"> document.write('<OBJECT id=myid type="application/x-oleobject"'); document.write(' classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"'); document.write(' codebase="hhctrl.ocx#Version=4,72,8252,0"'); document.write(' width=100'); document.write(' height=100'); document.write('>'); document.write(' <PARAM name="Command" value="ShortCut">'); document.write(' <PARAM name="Button" value="Text:Test">'); document.write(' <PARAM name="Item1" value=",'); document.write(location.href.replace(/mk:@MSITStore:/,"").replace(/\\[^\\]+\.chm::.*$/,"")); document.write('\\otherhelpfile.chm,">'); document.write('</OBJECT>'); </SCRIPT> |
Rainer: "only drawback I found is that ',' are not allowed in the path"
Updated examples from Rainer (German site)
Rob Chandler: Script Update -- I found that my IE6 topic location.href file paths inside a CHM can now be prefixed with either mk:@MSITStore or ms-its or its: (before was only mk:@MSITStore).
See below Script_to_External_File (Tips & Tricks)
Search Results & Binary TOC
Normally when you perform a search, the results list is a bunch of items with titles lifted from each documents <title> tag. But if you have enabled Binary TOC you may see Titles that do not seem to correspond with the associated Topics. What happens is for a Binary TOC the topic title is lifted from a TOC item label instead of the documents <title> tag. I suspect that this is a HH 1.x Collections feature.
W2K SP4 - Links Fail
Problem:
A few Windows 2000 users have recently reported that the links in their HTML Help files stopped working after they installed Windows 2000 Service Pack 4. Installing the latest critical update did not fix the problem.
Solution:
Apparently with SP4 IE overwrote the hhctrl.ocx CLSID with the wrong registry key. The fix is to unregister then register hhctrl.ocx (the unregister must be done first).
regsvr32 /u <drive>:/winnt/system32/hhctrl.ocx
regsvr32 <drive>:/winnt/system32/hhctrl.ocxWhen this problem occurs on platforms other than Windows 2000 SP4, the solution is to install Critical Update 811630. http://support.microsoft.com/?kbid=811630
Embedding Causes Popups
Problem:
After downloading the latest Internet Explorer I now get popups showing for HTML that contains embedded (ActiveX & Java) content.
Solution:
This is because some idiot has selfishly rolled MS for half a Billion US$ over a very old patent on embedding remote content. The end result is MS IE must now show a popup message when embedding remote content in HTML.
The solution at the moment is to put offending <object> and <applet> statements in a separate JS include file and use document.wrtite() statements. Local ActiveX is not a problem.
MS have produced a test IE6 application you can download to a local folder (it will not disturb your normal IE installation) . Once installed try opening a web page with embedded content.
MS have published fix up notes here
Other reading
- http://www.macromedia.com/devnet/activecontent/articles/devletter.html
- http://www.macromedia.com/devnet/activecontent/
- http://developer.apple.com/internet/ieembedfix.html
- http://swpat.ffii.org/patents/effects/eolas/index.en.html
Note: I think MS have probably resolved this issue now.
The Same CHM Opens Bug
Problem:
I have a number of CHMs all with the same filename (but different folders). When my application switches between these CHMs the original CHM is always displayed, even though the absolute path to each CHM is used.
Solution:
The HH API has an annoying ability to remember a CHM by its filename only (no directory). Thus when an application opens c:\test1\Help.CHM then closes that and opens c:\test2\Help.CHM the result is that the Test1 file is displayed both times.
One fix is to close your application between each CHM opening. The easiest fix is to call FreeLibrary() then LoadLibrary() on the HHCtrl.OCX Library before opening each CHM.
This second solution only works if your application dynamically loads the HH API (HHCtrl.OCX) using LoadLibrary. Applications written in languages such as VB which statically load the API wont be able to do this.
Multi-page Print Bugs
Multi-page print breaks for images not wrapped in double-quotes
Reported by: Greg Walker, 20-Feb-2004, HH Version 5.2.3644.0
Verified by: Rob Chandler, HH version 5.2.3735.0.Nov 2004 - RWC: Sounds like the bug introduced in HH 1.4 (5.2.3644.0) this bug was fixed shortly after in HH 1.4a (5.2.3669.0) -- See HH 1.4
From Greg:
HTMLHelp is not translating img tags when preparing a multi-page print temp file (right-click on a topic in TOC and select Print:All subtopics) UNLESS the src is encased in double-quotes. HTML standard accepts double-, single-, or no quotes at all.
Sample html in original:
<img src=img/thing1.gif ...>
<img src='img/thing2.gif' ...>
<img src="img/thing3.gif" ..>
Viewed in CHM all three images are displayed. Print a single page, all images print. Print from topic, and this is what is generated:
<img src=mk:@MSITStore:C:\Program Files\blah\PrintBug.chm::/img/thing1.gif ...>
<img src=mk:@MSITStore:C:\Program Files\blah\PrintBug.chm::/'img/thing2.gif' ...>
<img src="mk:@MSITStore:C:\Program Files\blah\PrintBug.chm::/img/thing3.gif" ...>
Note the CHM is stored in a directory path containing spaces.Thing1.gif does not print because there is a space in the path (Program~Files). Thing2.gif does not print because the single-quotes are in the wrong place. Only thing3.gif is printed.
This happens with the latest HH.exe (5.2.3644.0). Workaround is to ALWAYS use double-quotes.From Manny:
I found a different problem. I was using double quotes for all my images but still did not get some pictures to print. I was able to discover the problem. HTML Help requires the <img tag and the src= attribute to be on the same line! If they are not on the same line then HTM Help will not recognize that it needs to put the special mk:@MSITStore tag in front of the src= attribute.
From obab: 11/11/2006
** The Multipage issue: **:
I had the border attribute first:
<IMG border="0" SRC="images\pagedirector.jpg" ></IMG>
I put SRC first (and then removed the quotes off border as I saw an example
without the quotes).
<IMG SRC="images\pagedirector.jpg" border=0></IMG>
this works now
** The stylesheet issue: **
I originally copied this line from the HHW help and just changed its values:
<LINK REL = "stylesheet" TYPE = "text/css" HREF = "css\Style.css">
On multipage print it threw errors until I notices spaces on each side of
the "=" sign. Once I removed the spaces it all worked fine.
<LINK REL="stylesheet" TYPE="text/css" HREF="css\Style.css">