📄 helpfile.txt
字号:
#define FAM_ROMAN 0x02 FF_ROMAN, FF_SWISS, etc. of
#define FAM_SWISS 0x03 windows !
#define FAM_TECH 0x03
#define FAM_NIL 0x03
#define FAM_SCRIPT 0x04
#define FAM_DECOR 0x05
Multimedia MVB files use different structures to store font descriptors.
Assume this structure for descriptors if FacenamesOffset is at least 12.
If this kind of descriptor is used, any metric is given in twips.
struct newfont
{
unsigned char unknown1
short FacenameIndex
unsigned char FGRGB[3]
unsigned char BGRGB[3]
unsigned char unknown5
unsigned char unknown6
unsigned char unknown7
unsigned char unknown8
unsigned char unknown9
long Height
unsigned char mostlyzero[12]
short Weight
unsigned char unknown10
unsigned char unknown11
unsigned char Italic
unsigned char Underline
unsigned char StrikeOut
unsigned char DoubleUnderline
unsigned char SmallCaps
unsigned char unknown17
unsigned char unknown18
unsigned char PitchAndFamily Same values as windows LOGFONT
}
FontDescriptor[NumDescriptors]
Assume this structure for descriptors if FacenamesOffset is at least 16.
If this kind of descriptor is used, any metric is given in twips.
struct mvbfont
{
short FacenameIndex index into Facename array
short StyleNumber 0 if not used
unsigned char unknown3
unsigned char unknown4
unsigned char FGRGB[3]
unsigned char BGRGB[3]
long Height negative (incl. external leading)
unsigned char mostlyzero[12]
short Weight
unsigned char unknown10
unsigned char unknown11
unsigned char Italic
unsigned char Underline
unsigned char StrikeOut
unsigned char DoubleUnderline
unsigned char SmallCaps
unsigned char unknown17
unsigned char unknown18
unsigned char PitchAndFamily Same values as windows LOGFONT
unsigned char unknown20
unsigned char unknown21
}
FontDescriptor[NumDescriptors]
If FacenamesOffset is at least 12, the |FONT file supports character styles.
StyleNumber-1 of the FontDescriptor indexes into this array located at
StyleOffset in |FONT.
struct
{
short StyleNum
short BasedOnStyleNum 0 if not used
struct Font struct newfont or struct mvbfont
char unknown[35]
char StyleName[65]
}
Style[NumStyles]
If FacenamesOffset is at least 16, the |FONT file supports character mapping
tables.
The array of character mapping table file names is located in |FONT at
CharMapTableOffset and contains strings of the internal filename of the
character mapping table concatenated with ',' and the character mapping table
number. The entries are not sorted by character mapping table numbers. Short
strings are NUL-terminated, but a string may use up all bytes.
char CharMapTableName[NumCharMapTables][32]
|TOMAP
Windows 3.0 (HC30) uses topic numbers that start at 16 for the first topic
to identify topics. To retrieve the location of the TOPICLINK for the TOPIC-
HEADER of a certain topic (in |TOPIC explained later), use the |TOMAP file.
It contains an array of topic positions. Index with TopicNumber (do not
subtract 16). TopicPos[0] points to the topic specified as INDEX in the help
project.
TOPICPOS TopicPos[UsedSpace/4]
|CONTEXT
Windows 3.1 (HC31) uses hash values of context names to identify topics.
To get the location of the topic, search the B+ tree of the internal file
|CONTEXT:
Structure of |CONTEXT index-page entries:
struct
{
long HashValue
short PageNumber
}
CONTEXTINDEXENTRY[NEntries]
Structure of |CONTEXT leaf-page entries:
struct
{
long HashValue hash value of context id
TOPICOFFSET TopicOffset position
}
CONTEXTLEAFENTRY[NEntries]
To calculate the HashValue hash from a context id ptr do this:
signed char table[256]=
{
'\x00', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\x0B', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\xF7',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\x0C', '\xFF',
'\x0A', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
'\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F',
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
'\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F',
'\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
'\x28', '\x29', '\x2A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0D',
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
'\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F',
'\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
'\x28', '\x29', '\x2A', '\x2B', '\x2C', '\x2D', '\x2E', '\x2F',
'\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57',
'\x58', '\x59', '\x5A', '\x5B', '\x5C', '\x5D', '\x5E', '\x5F',
'\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67',
'\x68', '\x69', '\x6A', '\x6B', '\x6C', '\x6D', '\x6E', '\x6F',
'\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77',
'\x78', '\x79', '\x7A', '\x7B', '\x7C', '\x7D', '\x7E', '\x7F',
'\x80', '\x81', '\x82', '\x83', '\x0B', '\x85', '\x86', '\x87',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
'\x98', '\x99', '\x9A', '\x9B', '\x9C', '\x9D', '\x9E', '\x9F',
'\xA0', '\xA1', '\xA2', '\xA3', '\xA4', '\xA5', '\xA6', '\xA7',
'\xA8', '\xA9', '\xAA', '\xAB', '\xAC', '\xAD', '\xAE', '\xAF',
'\xB0', '\xB1', '\xB2', '\xB3', '\xB4', '\xB5', '\xB6', '\xB7',
'\xB8', '\xB9', '\xBA', '\xBB', '\xBC', '\xBD', '\xBE', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF'
}
for(hash=0L;*ptr;ptr++) hash=(hash*43)+table[(unsigned char)*ptr];
Remember that only 0-9, A-Z, a-z, _ and . are legal characters for context ids
in Win 3.1 (HC31). Only Windows 95 (HCRTF) allows nearly all characters.
The hash value for an empty string is 1.
|CTXOMAP
If your help project file had a [MAP] section, the internal file |CTXOMAP
contains an array to assign map ids to topic offsets.
short NEntries
struct
{
long MapID
TOPICOFFSET TopicOffset
}
CTXOMAPENRTY[NEntries]
|xWBTREE, |xWDATA, |xWMAP, |xKWBTREE, |xKWDATA, |xKWMAP
To locate a keyword assigned using a x-footnote (x may be A-Z, a-z), use the
|xWDATA, |xWBTREE and |xWMAP internal files. |xWBTREE tells you how often a
certain Keyword is defined in the help file.
Structure of |xWBTREE index page entries:
struct
{
STRINGZ Keyword
short PageNumber
}
xWBTREEINDEXENTRY[NEntries]
Structure of |xWBTREE leaf page entries:
struct
{
STRINGZ Keyword
short Count number of times keyword is referenced
long KWDataOffset this is the offset into |xWDATA
}
xWBTREELEAFENTRY[NEntries]
KWBTREE files in WinHlp32 GID files are structured differently (they have
a different description in the structure field of the BTREEHEADER) and pack
former KWBTREE and KWDATA files into one:
Structure of |xWBTREE leaf page entries in Win95 GID files:
struct
{
STRINGZ Keyword
long Size size of following record
struct
{
long FileNumber ?
long TopicOffset this is the offset into |xWDATA
}
record[Size/8]
}
xWBTREELEAFENTRY[NEntries]
The |xWDATA contains an array of topic offsets. The KWDataOffset from the
|xWBTREE tells you where to seek to in the |xWDATA file to read Count topic
offsets.
TOPICOFFSET KeywordTopicOffset[UsedSpace/4]
And the topic offset retrieved tells you which location the Keyword was
assigned to. It is -1L if the Keyword is assigned to a macro using the [MACROS]
section of HCRTF 4.0 (see description of |Rose file).
The |xWMAP contains an array that tells you where to find the n-th keyword in
the |xWBTREE. You don't need to use this file but it allows for faster
scrolling lists of alphabetically ordered Keywords. (WinHelp search dialog).
struct
{
long KeywordNumber number of first keyword on leaf-page
unsigned short PageNum B+ tree page number
}
xWMAP[UsedSpace/6]
Similarily |xKWBTREE B+ tree and |xKWDATA, |xKWMAP files (where x may be 0-9,
A-Z, a-z) are built from K-x:footnotes and [KEYINDEX] declarations of multi
media files.
|TTLBTREE
If you want to know the topic title assigned using the $-footnote, take a look
into the |TTLBTREE internal file, which contains topic titles ordered by topic
offsets in a B+ tree. (It is used by WinHelp to display the topic titles in
the search dialog).
Structure of |TTLBTREE index page entries:
struct
{
TOPICOFFSET TopicOffset
short PageNumber
}
TTLBTREEINDEXENTRY[NEntries]
Structure of |TTLBTREE leaf page entries:
struct
{
TOPICOFFSET TopicOffset
STRINGZ TopicTitle
}
TTLBTREELEAFENTRY[NEntries]
|CFn
The |CFn (where n is integer) internal file lists the macros defined in
[CONFIG:n] sections of the help project file (HCW 4.00). The file contains as
many macro strings as were specified one after another:
STRINGZ Macro[]
|Rose
The |Rose internal file contains all definitions from the [MACROS] section of a
Windows 95 (HCW 4.00) help project file. It is build using a B+ tree. Keywords
only appear using hash values but are listed in the |KWBTREE with a TopicPos in
the associated |KWDATA array of -1L.
Structure of |Rose index page entries:
struct
{
long KeywordHash
short PageNumber
}
RoseINDEXENTRY[NEntries]
Structure of |Rose leaf page entries:
struct
{
long KeywordHash
STRINGZ Macro
STRINGZ TopicTitle not a real topic title but the string
displayed in the search dialog where
normally topic titles are listed
}
RoseLEAFENTRY[NEntries]
|TopicId
The |TopicId internal file lists the ContextName assigned to a specific topic
offset if the help file was created using the /a option of HCRTF and is build
using a B+ tree.
Structure of |TopicId index-page entries:
struct
{
TOPICOFFSET TopicOffset
short PageNumber
}
TopicIdINDEXENTRY[NEntries]
Structure of |TopicId leaf-page entries:
struct
{
TOPICOFFSET TopicOffset
STRINGZ ContextName
}
TopicIdLEAFENTRY[NEntries]
|Petra
The |Petra internal file contains a B+ tree mentioning the names of the RTF
source files the help file was build from for each topic if the help file was
created using the /a option of HCRTF.
Structure of |Petra index-page entries:
struct
{
TOPICOFFSET TopicOffset
short PageNumber
}
PetraINDEXENTRY[NEntries]
Structure of |Petra leaf-page entries:
struct
{
TOPICOFFSET TopicOffset
STRINGZ RTFSourceFileName
}
PetraLEAFENTRY[NEntries]
|Viola
The |Viola internal file contains a B+ tree specifying the default Windows
assigned to topics using the > footnote available in HCRTF 4.00.
Structure of |VIOLA index-page entries:
struct
{
TOPICOFFSET TopicOffset
short PageNumber
}
VIOLAINDEXENTRY[NEntries]
Structure of |VIOLA leaf-page entries:
struct
{
TOPICOFFSET TopicOffset
long DefaultWindowNumber
}
VIOLALEAFENTRY[NEntries]
*.GID
I have not investigated GID files, as they are created by WinHlp32 and are not
needed for help file reconstruction. But they are based on the same file format
as Windows help files, so HELPDECO may be used to display their content. Notice
the difference between |xWBTREE files stored in *.GID files and regular files.
|WinPos
This file has been seen in WinHlp32 GID files, but always contained an empty
Btree (with an unknown 'a' in the BTREEHEADER structure).
|Pete
This file has been seen in WinHlp32 GID files but is currently not understood.
|Flags
This file has been seen in WinHlp32 GID files but is currently not understood.
|CntJump
This B+ tree stored in WinHlp32 GID files contains the jump references of
the *.CNT file.
|CntText
This B+ tree stored in WinHlp32 GID files contains the topic titles of the
jumps from the *.CNT file.
*.GRP
MediaView compilers create *.GRP internal files from group + footnotes
assigned to topics. All *.GRP files follow this structure:
struct
{
unsigned long Magic /* 0x000A3333 */
unsigned long BitmapSize /* max. 64000 equalling 512000 topics */
unsigned long LastTopic /* first topic in help file has topic number 0 */
unsigned long FirstTopic /* first topic in help file has topic number 0 */
unsigned long TopicsUsed /* in this group */
unsigned long TopicCount /* in whole help file */
unsigned long GroupType /* 1 or 2, see below */
unsigned long Unknown[3]
unsigned char Bitmap[BitmapSize] /* only if GroupType equals 2 */
}
GROUP
Starting with the first topic of the help file using TopicNumber 0, a topic is
included in a group if TopicNumber is in the range of FirstTopic to LastTopic.
If GroupType equals 2 it is additionally required that the corresponding bit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -