HTMLHelp Files - Help Information DE

Direkt zum Seiteninhalt

HTMLHelp Files


HTMLHelp Dateien

Die Laufzeit Komponenten sind im Abschnitt HTMLHelp Info beschrieben.


WinHelp vs. HTML Help Dateien

WinHelp wird seit Microsoft's Windows Vista nicht mit dem Betriebssystem vertrieben. Eine Anleitung beschreibt Schritt-für-Schritt, wie WinHelp (HLP) in HTMLHelp (CHM) auf der Ebene von Freeware/Shareware umgewandelt werden kann.
WinHelp HTMLHelp Beschreibung
.hlp .chm Hilfedatei
.hpj .hhp Projektdatei
.cnt .hhc Inhaltsverzeichnis-Datei. HHC wird in die CHM-Datei kompiliert.
.hhk Index-Datei. HHK wird in die CHM-Datei kompiliert.
hcw.exe hhw.exe Help Workshop. Kostenloses Basis-Autorentool von MS. Frühere Versionen von hcw sind hc31, hc, etc.
winhelp.exe hh.exe Startet die Hilfedatei. HH.EXE ist nur ein kleiner Stub, der die HTML-Hilfe-API aufruft.
hcrtf.exe hhc.exe Command Line Compiler. Hcrtf.exe isn’t a console program, but it does take command line parameters and can be run from a DOS prompt.
.rtf .htm, .html Die HTMLHelp ist HTML-basiert, während WinHelp RTF-basiert ist.
.bmp .dib .wmf .shg .jpg .gif HTMLHelp verwendet HTML-Dokumentgrafiken.
.gid .chw hh.dat Die .GID-Datei speichert zusammengeführte Schlüsselwörter (.CHW) und Positions-/Voreinstellungsinformationen (hh.dat).
.fts .ftg Bei HTMLHelp werden FTS-Informationen innerhalb der CHM
.ann .bmk hh.dat WinHelp Laufzeitdateien zum Speichern von Anmerkungen und Lesezeichen. HTML Help 1.2 bietet noch keine Anmerkungen, während Favoriten in HH.DAT gespeichert werden.

WinHelp vs. HTML Help Files

WinHelp is not distributed with the operating system since Microsoft's Windows Vista. A step-by-step guide describes how to convert WinHelp (HLP) to HTMLHelp (CHM) at the freeware/shareware level.

WinHelp HTMLHelp Description
.hlp .chm Main Help File.
.hpj .hhp Project file.
.cnt .hhc Table Of Contents file. HHC is compiled into the CHM file.
.hhk Index file. HHK is compiled into the CHM file.
hcw.exe hhw.exe Help Workshop. Free basic authoring tool from MS. Earlier versions of hcw are hc31, hc, etc.
winhelp.exe hh.exe Launches the help file. HH.EXE is just a small stub that calls the HTML Help API.
hcrtf.exe hhc.exe Command Line Compiler. Hcrtf.exe isn’t a console program, but it does take command line parameters and can be run from a DOS prompt.
.rtf .htm, .html HTML Help is HTML based while WinHelp is RTF based.
.bmp .dib .wmf .shg .jpg .gif HTML Help uses HTML document graphics.
.gid .chw hh.dat The .GID file stores merged keywords (.CHW) and position/preferences information (hh.dat).
.fts .ftg With HTML Help FTS information is stored inside the CHM
.ann .bmk hh.dat WinHelp run time files for storing annotations and bookmarks. HTML Help 1.2 does not yet offer annotations, while favorites are stored in HH.DAT.

HTMLHelp - Andere Dateien

not translated yet

Information on storage files and Workshop files.

hh.dat


Stores CHM position/preferences/favorites information.
Delete %windir%\hh.dat to reset all CHM windows to their default settings.
HH 1.3 and greater now writes hh.dat into the folder
%windir%\Application Data\Microsoft\HTML Help\
Tip: The Favorites information is written to the hh.dat file, but not immediately, so there can be a timing problem if you close and reopen a CHM file in fairly quick succession.

The location differs under other Windows.
Windows 98 single user
\Windows\Application Data\Microsoft\HTML Help
Windows 98 multi-user
\Windows\Profiles\%username%\Application Data\Microsoft\HTML Help
Windows 2000
\Documents and Settings\%username%\Application Data\Microsoft\HTML Help
Windows NT 4.0
\Winnt\Profiles\%username%\Application Data\Microsoft\HTML Help

hha.dll


Compiler Code Module. Used by both hhc.exe and hhw.exe to compile help.
Note: One problematic area of swapping versions is HHA.DLL. When HTML Help starts up, it looks to see if HHA.DLL is around, and if so, loads it and uses it for authoring messages, diagnostics, etc. If you right-click on a non-binary TOC, choose View Entry and get a GPF, then you can be fairly certain you have a mismatched version of HHA.DLL. Of coursing swapping HHA.DLL also means you are changing the compiler, so you shouldn't automatically change HHA.DLL when switching HH versions unless you don't mind changing compiler versions.
HHA.DLL (4.74.8702.0) has not changed for a long time. There is a newer version available, hha.dll (4.74.9301.0) which fixes 2 known bugs. A crash when compiling Japanese projects and a crash when editing TOC items. To get this newer version contact MS Support and quote KB304412 and KB294990 (you may need to tell them your Windows version as well).

Registry, hh.ini and winhelp.ini


To help windows locate a help file, place the name of the help file in a special registry key or ini file.
CHM's
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTML Help]
Name = myfile.chm
Data = "c:\chmfolder\"
Or use HH.INI (see below)

HLP's
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Help]
Name = myfile.hlp
Data = c:\hlpfolder\
Or use WINHELP.INI (see below)

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.

.ITS Files (cousin to .CHM)


Posted by Ralph Walden 22/June/2000
An .ITS file is associated with the I.E. browser -- which means if you double-click it, it will be displayed within the browser rather then the HTML Help window. What will be displayed will be default.htm. You can, of course, link to files within an ITS file just like a CHM file. You can create an ITS file by either compiling a CHM file and then renaming it, or by setting the .ITS extension in your project file. However, I would not recommend this if you are going to use the file in HTML Help -- from HH's perspective, there's no advantage to the different extension, and you rely on the HH team remembering to ALWAYS check for the .ITS extension whenever they check for the .CHM extension (in other words, any easy mistake for them to make). If you are only going to be displaying the file inside the I.E. browser, then you should definitely change the extension -- that way the user can double-click it and have it displayed in the browser.
While the file format of a CHM and ITS file is the same, if you are going to be displaying an ITS file only inside of the browser, then there's some internal files that aren't necessary. If you recompile the ITS file using KeyTools, then it will remove those extra files. That will reduce the size of the ITS file by about 8K, will still work just fine inside of the browser, and will probably make HTML Help very unhappy (so don't use an ITS file with HH).
ITS files viewed by the browser are handled entirely by ITSS.DLL. That particular component has been remarkably stable -- essentially it is unchanged since the release with I.E. 4.0. That means hhupd is not necessary for displaying an ITS file within the browser as long as the user has I.E. 4.0 or above.
BTW, if you are using I.E., and you go out to my web site (www.keyworks.net) and look at the address once you get there, you'll notice that you are looking at an ITS file. No, this is not a way to deliver a single HTML file out of an ITS file -- you did download the entire ITS file. However, that ITS file is 6K and holds some 20K of text -- which means in about the time it would have taken you to download a single HTML page, you've downloaded most of the web site. Links within the site are quick even with a 28K modem because you don't have to connect back to the site and download more text -- it's already on your machine. The ITS file is treated like any HTML file in that it is discarded as part of the history flushing that I.E. does automatically.

ITS file format



HTMLHelp - Andere Dateien (Weitere Info)


Changing Versions


Generally, you don't need to reboot. If you can change hhctrl.ocx at all then you have effectively changed the version of HTML Help. What you may find is that you get an access denied when trying to delete or copy over a different version of hhctrl.ocx. There are times when hhctrl.ocx will be loaded with no visible window and while it's loaded, you can't delete or replace it. In that case, you will need to reboot your system. But aside from that, there is no reason to reboot just to change versions of HH.
Try this under 1.2: Download say the French hhudp.exe.  Use WinZip to extract the hhctrl.ocx. Replace the current hhctrl.ocx with the French version. Run a CHM and you will see the French interface.

ms-its:


CHM files are accessed through a pluggable protocol (ms-its:) which in turn uses the IStorage interface to read the HTML and other files and hands them to the caller.
Look up "protocol" in the Search tab of the latest MSDN. Looks like it's also part of the Internet SDK documentation.

ms = Microsoft
its = InfoTech Store (InfoTech is a Microsoft group that builds search and storage technology).
itss=InfoTech Storage System.

CHM File Format


CHM files are stored in what in techie-speak is called an IStorage format. That allows you to read any of the files within a CHM file without having to know the storage format. Source code for doing that is part of the source code package at http://www.keyworks.net/code.htm (see the CItsFile class).

Compiling


HHC.EXE is an extremely simple program -- all it does is take your .HHP, hand it to hha.dll to compile, send any output messages to your screen, and exit when done. HHW does the exact same thing, except that it also displays some animation to let you know that the compiler is doing something. Authoring tools which support compiling do the same thing -- they may do some pre-processing of the project file, and post-processing of the output file, but in the end, they all call into hha.dll to do the actual work of compiling.

Threads


When HTML Help is on the same thread as the calling application, it is possible that the calling app can trap keystrokes that were meant for HTML Help. That means that you could bring up an HH window, enter some text in the Index tab, press Backspace, and the Backspace keystroke gets sent to the application instead of the HH window.
While I was at MS, there was only one program that exhibited this problem, which is why 1.0 and 1.1 use the caller's thread. 1.2 switched to a separate thread as the default. However, this can cause its own problems. For example, if you use the 1.1 version of HHW with the 1.2 version of HHCTRL, switching to the Help tab in HHW will cause a hang because the HH TOC control doesn't initialize correctly when run off a thread (at least, not from HHW).

For the vast majority of programs, it won't make any difference if HH is on a separate thread or not. If you are having timing problems between your program and HH (for example, delayed drawing of the HH window), or you are using the HH TOC ActiveX control and it is hanging, then you might want to try the HH_INITIALIZE approach.

HH Embedded


The way you created embedded windows between 1.1 and 1.2 changed. There's usually two additional things you must do to get your HH embedded windows to work in 1.2 -- they'll still work in 1.1 with these changes, so you should always do this.
In addition to setting HHWIN_PROP_NODEF_STYLES you must also set HHWIN_PROP_NOTITLEBAR -- otherwise you'll end up with a frame window instead of a child window.
You window style must include WS_CLIPCHILDREN or your embedded window may not show.
BTW, since you are using MFC, you might want to take a look at www.keyworks.net/code.htm -- there's source code there for an MFC class that will create an embedded help window in a dialog that you should be able to easily modify to get it to work in your CControlBar derivative.

Text Blocks


>I searched the archives for this but didn't find anything. I'm wondering
>where MS HTML Help Workshop text blocks are stored.
They are stored in the registry: HKEY_CURRENT_USER\Software\Microsoft\HTML
Help Workshop\Settings -- buf1, buf2, ... buf9


HTMLHelp - Other files

Information on storage files and Workshop files.

hh.dat


Stores CHM position/preferences/favorites information.
Delete %windir%\hh.dat to reset all CHM windows to their default settings.
HH 1.3 and greater now writes hh.dat into the folder
%windir%\Application Data\Microsoft\HTML Help\
Tip: The Favorites information is written to the hh.dat file, but not immediately, so there can be a timing problem if you close and reopen a CHM file in fairly quick succession.

The location differs under other Windows.
Windows 98 single user
\Windows\Application Data\Microsoft\HTML Help
Windows 98 multi-user
\Windows\Profiles\%username%\Application Data\Microsoft\HTML Help
Windows 2000
\Documents and Settings\%username%\Application Data\Microsoft\HTML Help
Windows NT 4.0
\Winnt\Profiles\%username%\Application Data\Microsoft\HTML Help

hha.dll


Compiler Code Module. Used by both hhc.exe and hhw.exe to compile help.
Note: One problematic area of swapping versions is HHA.DLL. When HTML Help starts up, it looks to see if HHA.DLL is around, and if so, loads it and uses it for authoring messages, diagnostics, etc. If you right-click on a non-binary TOC, choose View Entry and get a GPF, then you can be fairly certain you have a mismatched version of HHA.DLL. Of coursing swapping HHA.DLL also means you are changing the compiler, so you shouldn't automatically change HHA.DLL when switching HH versions unless you don't mind changing compiler versions.
HHA.DLL (4.74.8702.0) has not changed for a long time. There is a newer version available, hha.dll (4.74.9301.0) which fixes 2 known bugs. A crash when compiling Japanese projects and a crash when editing TOC items. To get this newer version contact MS Support and quote KB304412 and KB294990 (you may need to tell them your Windows version as well).

Registry, hh.ini and winhelp.ini


To help windows locate a help file, place the name of the help file in a special registry key or ini file.
CHM's
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTML Help]
Name = myfile.chm
Data = "c:\chmfolder\"
Or use HH.INI (see below)

HLP's
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Help]
Name = myfile.hlp
Data = c:\hlpfolder\
Or use WINHELP.INI (see below)

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.

.ITS Files (cousin to .CHM)


Posted by Ralph Walden 22/June/2000
An .ITS file is associated with the I.E. browser -- which means if you double-click it, it will be displayed within the browser rather then the HTML Help window. What will be displayed will be default.htm. You can, of course, link to files within an ITS file just like a CHM file. You can create an ITS file by either compiling a CHM file and then renaming it, or by setting the .ITS extension in your project file. However, I would not recommend this if you are going to use the file in HTML Help -- from HH's perspective, there's no advantage to the different extension, and you rely on the HH team remembering to ALWAYS check for the .ITS extension whenever they check for the .CHM extension (in other words, any easy mistake for them to make). If you are only going to be displaying the file inside the I.E. browser, then you should definitely change the extension -- that way the user can double-click it and have it displayed in the browser.
While the file format of a CHM and ITS file is the same, if you are going to be displaying an ITS file only inside of the browser, then there's some internal files that aren't necessary. If you recompile the ITS file using KeyTools, then it will remove those extra files. That will reduce the size of the ITS file by about 8K, will still work just fine inside of the browser, and will probably make HTML Help very unhappy (so don't use an ITS file with HH).
ITS files viewed by the browser are handled entirely by ITSS.DLL. That particular component has been remarkably stable -- essentially it is unchanged since the release with I.E. 4.0. That means hhupd is not necessary for displaying an ITS file within the browser as long as the user has I.E. 4.0 or above.
BTW, if you are using I.E., and you go out to my web site (www.keyworks.net) and look at the address once you get there, you'll notice that you are looking at an ITS file. No, this is not a way to deliver a single HTML file out of an ITS file -- you did download the entire ITS file. However, that ITS file is 6K and holds some 20K of text -- which means in about the time it would have taken you to download a single HTML page, you've downloaded most of the web site. Links within the site are quick even with a 28K modem because you don't have to connect back to the site and download more text -- it's already on your machine. The ITS file is treated like any HTML file in that it is discarded as part of the history flushing that I.E. does automatically.

ITS file format



HTMLHelp - Other files (More info)


Changing Versions


Generally, you don't need to reboot. If you can change hhctrl.ocx at all then you have effectively changed the version of HTML Help. What you may find is that you get an access denied when trying to delete or copy over a different version of hhctrl.ocx. There are times when hhctrl.ocx will be loaded with no visible window and while it's loaded, you can't delete or replace it. In that case, you will need to reboot your system. But aside from that, there is no reason to reboot just to change versions of HH.
Try this under 1.2: Download say the French hhudp.exe.  Use WinZip to extract the hhctrl.ocx. Replace the current hhctrl.ocx with the French version. Run a CHM and you will see the French interface.

ms-its:


CHM files are accessed through a pluggable protocol (ms-its:) which in turn uses the IStorage interface to read the HTML and other files and hands them to the caller.
Look up "protocol" in the Search tab of the latest MSDN. Looks like it's also part of the Internet SDK documentation.

ms = Microsoft
its = InfoTech Store (InfoTech is a Microsoft group that builds search and storage technology).
itss=InfoTech Storage System.

CHM File Format


CHM files are stored in what in techie-speak is called an IStorage format. That allows you to read any of the files within a CHM file without having to know the storage format. Source code for doing that is part of the source code package at http://www.keyworks.net/code.htm (see the CItsFile class).

Compiling


HHC.EXE is an extremely simple program -- all it does is take your .HHP, hand it to hha.dll to compile, send any output messages to your screen, and exit when done. HHW does the exact same thing, except that it also displays some animation to let you know that the compiler is doing something. Authoring tools which support compiling do the same thing -- they may do some pre-processing of the project file, and post-processing of the output file, but in the end, they all call into hha.dll to do the actual work of compiling.

Threads


When HTML Help is on the same thread as the calling application, it is possible that the calling app can trap keystrokes that were meant for HTML Help. That means that you could bring up an HH window, enter some text in the Index tab, press Backspace, and the Backspace keystroke gets sent to the application instead of the HH window.
While I was at MS, there was only one program that exhibited this problem, which is why 1.0 and 1.1 use the caller's thread. 1.2 switched to a separate thread as the default. However, this can cause its own problems. For example, if you use the 1.1 version of HHW with the 1.2 version of HHCTRL, switching to the Help tab in HHW will cause a hang because the HH TOC control doesn't initialize correctly when run off a thread (at least, not from HHW).

For the vast majority of programs, it won't make any difference if HH is on a separate thread or not. If you are having timing problems between your program and HH (for example, delayed drawing of the HH window), or you are using the HH TOC ActiveX control and it is hanging, then you might want to try the HH_INITIALIZE approach.

HH Embedded


The way you created embedded windows between 1.1 and 1.2 changed. There's usually two additional things you must do to get your HH embedded windows to work in 1.2 -- they'll still work in 1.1 with these changes, so you should always do this.
In addition to setting HHWIN_PROP_NODEF_STYLES you must also set HHWIN_PROP_NOTITLEBAR -- otherwise you'll end up with a frame window instead of a child window.
You window style must include WS_CLIPCHILDREN or your embedded window may not show.
BTW, since you are using MFC, you might want to take a look at www.keyworks.net/code.htm -- there's source code there for an MFC class that will create an embedded help window in a dialog that you should be able to easily modify to get it to work in your CControlBar derivative.

Text Blocks


>I searched the archives for this but didn't find anything. I'm wondering
>where MS HTML Help Workshop text blocks are stored.
They are stored in the registry: HKEY_CURRENT_USER\Software\Microsoft\HTML
Help Workshop\Settings -- buf1, buf2, ... buf9




Zurück zum Seiteninhalt