About the HTML Help ActiveX Control reference

The HTML Help ActiveX Control reference provides information about how to use the control in an HTML file and how to set its commands and properties.

The reference provides the following sections:

Overview

This topic describes the functionality of the HTML Help ActiveX Control and how it interacts with Microsoft Internet Explorer. It explains how to insert the control into an HTML file and how to code the HTML <OBJECT> tag. It also discusses how to work with multiple instances of the control.

Commands

These topics provide comprehensive reference information for all run-time and compile-time commands. They include syntax descriptions and code examples for each command.

Properties

These topics provide comprehensive reference information for all properties with links to all commands that use a specific property.

Scripting with the ActiveX Control

These topics explain when to use a script with the HTML Help ActiveX Control and how to insert an instance of the control for use with a script. They also provide script examples with step-by-step instructions for implementing the script in a help system.

© 1997 Microsoft Corporation. All rights reserved. Terms of use.


About the HTML Help ActiveX Control

The HTML Help ActiveX Control (Hhctrl.ocx) provides rich HTML Help functionality, such as an expanding table of contents, keyword search, shortcuts, and secondary windows, for a help system. The control is one of the components of HTML Help. It is also included with many third-party HTML Help authoring tools.

The HTML Help ActiveX Control provides its functionality in two ways:

  • For uncompiled HTML files on a Web site, the HTML Help ActiveX Control uses Microsoft Internet Explorer to add functionality.
  • For compiled help (.chm) files, the HTML Help ActiveX Control uses both an Internet Explorer DLL (Shdocvw.dll) and the HTML Help Compiler to offer a wider range of functionality than is possible with uncompiled HTML files. Users view compiled help files in the HTML Help Viewer.

The HTML Help ActiveX Control is designed to work with Internet Explorer and the Shdocvw.dll component. It does not include the design-time support that is necessary to use it with development tools, such as Visual Basic and Visual C++.

Using the HTML Help ActiveX Control in compiled help files versus uncompiled HTML files

Some of the functionality that the HTML Help ActiveX Control provides for compiled help (.chm) files is not available for uncompiled HTML files. For example, KLinks are not available unless you compile your HTML files. The compiler performs the task of pulling keywords from individual HTML files and adding them to the index.

Whether you use the HTML Help ActiveX Control with a compiled help file or uncompiled HTML files, you can choose to manually insert the control by typing the appropriate code, or you can use the HTML Help ActiveX Control Wizard.

After you insert an instance of the control in an HTML file, you can copy additional instances and manually edit the properties of each control.

Inserting the HTML Help ActiveX Control using HTML Help Workshop

You can use the HTML Help ActiveX Control Wizard that is part of HTML Help Workshop to create any of the run-time commands in an HTML file. The compile-time commands are available by clicking Compiler Information on the Edit menu. Compile-time commands use a special CLASSID that is different from run-time commands. This CLASSID is used only by the HTML Help compiler.

To use the HTML Help ActiveX Control Wizard, start HTML Help Workshop and open the HTML file into which you want to insert the control. Place your cursor anywhere between the <BODY> start and end tags, and then click HTML Help ActiveX Control.

To edit an existing instance of the control (run-time or compile-time), place your cursor anywhere within the <OBJECT> start and end tags of the control that you want to edit, and then click HTML Help ActiveX Control.

Note

  • To complete the steps in the HTML Help ActiveX Control Wizard, you must select from a list of available commands; the wizard does not currently support insertion of a custom command that is invoked through a scripting language. However, if you want to use the control with a script, you can use the wizard to insert the basic control syntax, and then remove the sequence of <PARAM> values. For more information about using scripts, see About the HTML Help ActiveX Control and scripts.

Inserting the HTML Help ActiveX Control manually

The easiest way to work with the HTML Help ActiveX Control is to insert it using the HTML Help ActiveX Control Wizard. However, you can also copy an existing instance of the control into other HTML files and manually edit the properties.

If you are copying a control, make sure to copy all the text from the start <OBJECT> tag to the end </OBJECT> tag. You should insert the control between the <BODY> start and end tags of the file you want to add the control to.

The following example is an instance of the HTML Help ActiveX Control that calls the HH Version run-time command. A button is created in the HTML file that displays the version number of the control when a user clicks it:

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0">
<PARAM name="Command" value="HH Version">
<PARAM name="Button" value="Text:test">
</OBJECT>

This example contains the basic code required for most instances of the run-time commands.

For information about the syntax of the control, see About HTML Help ActiveX Control syntax. For information about using the control with a scripting language, see About the HTML Help ActiveX Control and scripts.


About the HTML Help ActiveX Control syntax

The HTML Help ActiveX Control (Hhctrl.ocx) provides two types of functionality to an HTML file: run-time features such as a splash screen or a table of contents, and compile-time features such as looking up ALink and KLink targets.

All of the code required for an HTML Help ActiveX Control command is contained between the HTML <OBJECT> start and end tags.

Working with run-time commands

Use a run-time instance of the control to invoke any of the run-time commands or if you are using a script to invoke a command.

To specify a run-time command, you specify the appropriate command name using the PARAM attribute.

Example: Specify the Index run-time command

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100%
height=100%
>
<PARAM name="Command" value="Index">
<PARAM name="Item1" value="MyIndex.hhk">
</OBJECT>

Working with compile-time commands

Use a compile-time instance of the HTML Help ActiveX Control only for compile-time commands. This means you must compile your HTML files to implement the compile-time feature.

Compile-time commands do not require a command name and use a special CLASSID that is used only by the HTML Help compiler.

Example: Specify the Compiler Information compile-time command

<Object type="application/x-oleobject" classid="clsid:1e2a7bd0- dab9-11d0-b93a-00c04fc99f9e">

<param name="Keyword" value="keyword1">
<param name="Keyword" value="keyword2">
<param name="ALink Name" value="ALink1">
<param name="ALink Name" value="ALink2">
</OBJECT>

Coding the HTML <OBJECT> tag

The <OBJECT> tag enables you to embed the HTML Help ActiveX Control directly into a file. Note that compile-time instances of the control require only the TYPE and PARAM attributes.

ID

The ID attribute specifies the name by which the HTML Help ActiveX Control will be known to the HTML file. The default ID is HHCTRL, but you can specify any name you like. For example, if you entered Test as the ID, you would specify Test to interact with or automate the control with a script.

When you use multiple instances of the HTML Help ActiveX Control in the same file, each instance must have a unique ID.

TYPE

The TYPE attribute specifies the MIME type for the object. The HTML Help ActiveX Control type is always application/x-oleobject.

CLASSID

The CLASSID attribute uniquely identifies the HTML Help ActiveX Control from other ActiveX Controls. The HTML Help ActiveX Control identifier is the registry key number and is the same for every instance of the control that you use.

The CLASSID for run-time commands is
clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11.

The CLASSID for compile-time commands is
clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e.

CODEBASE

The CODEBASE attribute enables the automatic download mechanism of ActiveX Controls and full version checking.

PARAM

The PARAM attribute, which is also it's own HTML tag with attributes specific to it, lists a sequence of parameters that are passed to the HTML Help ActiveX Control to specify which HTML Help feature to provide and how to provide it.

Other Attributes

Several standard formatting attributes, such as ALIGN, HEIGHT, WIDTH, BORDER, HSPACE, VSPACE, NAME, etc. can also be used to define the positioning of the HTML Help ActiveX Control in an HTML file.

WIDTH and HEIGHT values can be expressed in percentage, followed by a percent sign, or in pixels (numerical value only).

Coding the HTML Help ActiveX Control PARAM attribute

The PARAM attribute is used to pass a sequence of properties to the HTML Help ActiveX Control to specify which HTML Help feature to provide and how to provide it. The <PARAM> tag appears within the <OBJECT> tag and does not require an end tag.

NAME

The NAME attribute specifies the run-time command or property to be defined.

VALUE

The VALUE attribute specifies the run-time command or property value.

Note

  • For more information about other attributes supported by the <OBJECT> and <PARAM> tags, see a comprehensive HTML Reference such as the Microsoft Developer Network (MSDN) HTML Reference.


About using multiple instances of HHCTRL

About using multiple instances of the HTML Help ActiveX Control

It is not uncommon for a single HTML file to host multiple instances of the HTML Help ActiveX Control. For example:
  • You may want to create multiple ALink names for target topics that reside in more than one compiled help (.chm) file. In this case, you need to create one instance of the HTML Help ActiveX Control for each compiled help file you want to reference.
  • You may want to implement a splash screen, a Related Topics button, and a call to a WinHelp topic all from the same HTML file.
  • You may want to author multiple topics in one HTML file and use the Split File command to create individual HTML files during compilation. The Split File command behaves the same way that a page break does in a Rich Text Format (.rtf) file.

The HTML Help ActiveX Control run-time commands should be located in the HTML file exactly where you want the feature to appear. Compile-time commands, however, remain hidden in an HTML file and can occur anywhere between the <BODY> start and end tags.

If multiple instances of the control are used in the same file, each instance must have a unique name specified in the ID attribute of the <OBJECT> tag. The ID attribute is case-sensitive.

Compile-time commands function only in a compiled help file. If you create HTML Help ActiveX Control compile-time commands in uncompiled HTML files, they will be ignored by the Web browser.


About the HTML Help ActiveX Control commands

Use the HTML Help ActiveX Control (Hhctrl.ocx) commands to add functionality to a compiled help (.chm) file or a set of uncompiled HTML files. For example, the Contents command adds a graphical table of contents to your help system based on a contents (.hhc) file that you specify.

Only one HTML Help ActiveX Control command can be specified in any single instance of Hhctrl.ocx. Commands are the part of the <PARAM> tag that specify an action for the HTML Help ActiveX Control to carry out. The other <PARAM> tag attributes are HTML Help ActiveX Control properties that specify exactly how to carry out the command.

This is an example of the code for the Contents command:

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0,0"
width=100%
height=100%
>
<PARAM name="Command" value="Contents">
<PARAM name="Item1" value="C:\file.hhc">
<PARAM name="Flags" value="0x4000,0x800035>
</OBJECT>

The HTML Help ActiveX Control and scripting languages

The HTML Help ActiveX Control commands can be used with any scripting language, such as JScript or Visual Basic Scripting Edition. While all of the commands can be used without scripting, the use of scripting can provide fuller integration into an HTML file.

For more information about custom scripts, see Using the HTML Help ActiveX Control with scripts.

For more information about ActiveX technology, see Microsoft's Component Object Model (COM) technologies Web site.

Using the HTML Help ActiveX Control commands

All of the HTML Help ActiveX Control run-time commands are available in HTML Help Workshop through the HTML Help ActiveX Control Wizard. The Wizard guides you through the process of inserting the HTML Help ActiveX Control and specifying the properties for each run-time command.

To insert a compile-time command using HTML Help Workshop, select the command name from the Edit menu. These commands are not available through the HTML Help ActiveX Control Wizard.

HTML Help ActiveX Control command quick reference

All of the HTML Help ActiveX Control commands are listed in the following table. In the Command Type column, R specifies a run-time command and C specifies a compile-time command.

HTML Help ActiveX Control commands

Command Type

For use with a compiled help (.chm) file

For use with uncompiled HTML files
ALink R X ...
Close R X ...
Compiler Information C X ...
Contents | R | X | X
HH version | R | X | X
Index | R | X | X
KLink R X ...
Related Topics | R | X | X
Shortcut R X ...
Splash | R | X | X
Split File C X ...
TCard R X ...
WinHelp R X ...


ALink

Purpose

Creates Associative links (ALinks) that jump to target HTML files that contain the specified ALink names. The list of target topics appears in either the Topics Found dialog box or on a pop-up menu.

This command can be used only with a compiled help (.chm) file.

To add ALink names to an HTML file, use the Compiler Information command.

Syntax

<PARAM name="Command" value="ALink [,menu|dialog]">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Frame" value="Frame Name">
<PARAM name="Window" value="Window Name">
<PARAM name="Flags" value=",,1">
<PARAM name="Flags" value="1">
<PARAM name="Item1" value=".chm file path">
<PARAM name="Item2" value="ALink text">

Property | Property Description
Button | Specifies the button style.
Command | Calls ALink and specifies a window type. To display the Topics Found dialog box, type dialog. To display a pop-up menu, type menu. If you do not specify dialog or menu, the Topics Found dialog box appears by default.
Flags | Specifies how to behave if only one target is found and/or if the target is unavailable.
Frame | Specifies the frame in which to display the selected topic. Optional.
Item1 | Specifies the compiled help file that contains the target topics.
Item2 | Specifies the text for one ALink name. This text must match the ALink names you insert into target topics. Subsequent ALink names are specified as Item3, Item4, etc.
Window | Specifies the target window in which to display the selected topic. Optional.

Example

Note that in this example ALink targets will appear in the Topics Found dialog box because neither dialog nor menu is specified in the ALink property.

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="ALink">
<PARAM name="Button" value="Text:See Also">
<PARAM name="Item1" value="c:\Help\MyFile.chm">
<PARAM name="Item2" value="overview">
<PARAM name="Item3" value="bibliography">
</OBJECT>

Sample ALink Command

Comments

The Button property is omitted when this command is invoked by a script.


Close

Purpose

Closes the window in which the current topic appears. You can use the Close command to close a secondary window in situations where the window does not include a button bar or other navigational controls.

The Close command could also be used with an interactive help wizard. For example, a user could answer the question "Did this solve your problem?" by clicking No, which would link to the next topic, or clicking Yes, which would close the window.

This command can be used only with a compiled help (.chm) file.

Syntax

<PARAM name="Command" value="Close">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">

Property | Property Description
Button | Specifies the button style.
Command | Calls the Close command.

Example

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="Close">
<PARAM name="Button" value="Text:Close this window!">
</OBJECT>

Sample Close Command

Click here to see how the Close command can be used.

Comments

The Button property is omitted when this command is invoked by a script.


Contents

Purpose

Adds a table of contents based on a specified contents (.hhc) file. This command can be used with either a compiled help (.chm) file or uncompiled HTML files.

If you are using a compiled help file, you can specify an option in your project (.hhp) file to add a table of contents to the help file during compilation.

Syntax

<PARAM name="Command" value="Contents [,menu|dialog]">
<PARAM name="Item1" value=".hhc file path">
<PARAM name="Flags" value="0xn,0xn">
Property | Property Description
Command | Calls the Contents command.
Flags Specifies ExWindow Styles and Window Styles values for the selected window style attributes. The values are stored as hexadecimal numbers in the format 0xn.

To specify the default window settings, omit the Flags property.

Default window style attributes:
  • Border
  • Plus/minus squares
  • Show selection when focus lost
  • Start line from the root
  • Sunken edge
Other window style attributes:
  • Dialog frame
  • Draw lines between items
  • Raised edge
  • Right-to-left reading order
  • Scroll bar on left side
Item1 | Specifies the contents (.hhc) file path.

Example

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100%
height=100%
>
<PARAM name="Command" value="Contents">
<PARAM name="Item1" value="C:\file.hhc">
<PARAM name="Flags" value="0x4000,0x800035>
</OBJECT>

Comments

The Flags property overrides the ExWindow Styles and Window Styles property values specified in the contents file.


HH Version

Purpose

Displays the version number of the HTML Help ActiveX Control. This can be helpful for users to determine whether they are using the most current version of HTML Help.

This command can be used with either a compiled help (.chm) file or uncompiled HTML files.

Syntax

<PARAM name="Command" value="HH Version">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">

Property | Property Description
Button | Specifies the button style.
Command | Calls the HH Version command.

Example

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="HH Version">
<PARAM name="Button" value="Text:Click for version number">
</OBJECT>

Sample Version Command

Click here to see the version number of the HTML Help ActiveX Control.

Comments

The Button property is omitted when this command is invoked by a script.


Index

Purpose

Adds an index based on a specified HTML Help index (.hhk) file. This command can be used with either a compiled help (.chm) file or uncompiled HTML files.

If you are using a compiled help file, you can specify an option in your project (.hhp) file to add an index to the help file during compilation.

Syntax

<PARAM name="Command" value="Index">
<PARAM name="Item1" value=".hhk file path">

Property | Property Description
Command | Calls the Index command.
Item1 | Specifies the index (.hhk) file path.

Example

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100%
height=100%
>
<PARAM name="Command" value="Index">
<PARAM name="Item1" value="c:\Index Files\MyIndex.hhk">
</OBJECT>
link to overview topic About the HTML Help ActiveX Control commands


KLink

Purpose

Creates KLink targets that jump to HTML files that contain the specified index keyword(s). The list of target topics appears in either the Topics Found dialog box or a pop-up menu. In a compiled HTML Help (.chm) file, keywords also appear on the Index tab.

This command can be used only with a compiled help (.chm) file.

To add keywords to a target HTML file, use the Compiler Information command.

Syntax

<PARAM name="Command" value="KLink [,menu|dialog]">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Frame" value="Frame Name">
<PARAM name="Window" value="Window Name">
<PARAM name="Flags" value=",,1">
<PARAM name="Flags" value="1">
<PARAM name="Item1" value=".chm file path">
<PARAM name="Item2" value="keyword text">

Property | Property Description
Button | Specifies the button style.
Command | Calls the KLink command and specifies a window type. To display the Topics Found dialog box, type dialog. To display a pop-up menu, type menu. If you do not specify dialog or menu, the Topics Found dialog box appears by default.
Flags | Specifies how the command will behave if only one target is found or the target is unavailable.
Frame | Specifies the frame in which to display the selected topic. Optional.
Item1 | Specifies the compiled help (.chm) file that contains the target topics.
Item2 | Specifies the KLink keyword text for one keyword. This text must match the KLink keywords you insert in target topics. Subsequent keywords are specified as Item3, Item4, etc.
Window | Specifies the window in which to display the selected topic. Optional.

Example

Note that KLink targets will appear in the Topics Found dialog box in this example because neither dialog nor menu is specified in the KLink property.

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="KLink">
<PARAM name="Button" value="Text:test">
<PARAM name="Item1" value="File.chm">
<PARAM name="Item2" value="first klink name">
<PARAM name="Item3" value="second klink name">
</OBJECT>

Comments

The Button property is omitted when this command is invoked by a script.


Related Topics

Purpose

Displays a list of target topics that a user can jump to. The Item property stores information about each target.

This command can be used with either a compiled help (.chm) file or uncompiled HTML files.

Syntax

<PARAM name="Command" value="Related Topics [,menu|dialog]">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Frame" value="Frame Name">
<PARAM name="Window" value="Window Name">
<PARAM name="Item1" value="Topic1;Main URL for Topic1;Alternate URL for Topic1">
Property | Property Description
Button | Specifies the button style.
Command Calls the Related Topics command and specifies a window type.

To display the Topics Found dialog box, type dialog.

To display a pop-up menu, type menu.

If you do not specify dialog or menu, the Topics Found dialog box appears by default.
Frame | Specifies the frame in which to display the selected topic. Optional.
Item1 Specifies the following information about the target topic:
  • Topic title as you want it to appear in the Topics Found dialog box or on a pop-up menu.
  • Topic URL.
  • Alternate topic URL used if the first URL is unavailable.

Values are separated with a semicolon.

To specify subsequent topic information, use Item2, Item3, etc.
Window | Specifies the target window in which to display the selected topic. Optional.

Example

<OBJECT id=candomble type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="Hhctrl.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="Related Topics, MENU">
<PARAM name="Button" value="Text:See Also">
<PARAM name="Item1" value="About Oxala;oxala.html;http://www.pantheon.org">

<PARAM name="Item2" value="About Yemanja;Yemanja.html;http://www.pantheon.org">

<PARAM name="Item3" value="About Oba;oba.html;http://www.pantheon.org">

<PARAM name="Item4" value="About Ogum;ogum.html;http://www.pantheon.org">

<PARAM name="Item5" value="Bad Link;bad_link.html;ogum.html">

</OBJECT>

Comments

The Button property is omitted when this command is invoked by a script.


Shortcut

Purpose

Creates a shortcut to a specified action by passing Windows-based messages and parameters. For example, if a help topic discusses a procedure that involves a specific dialog box, you can provide a link that a user can click in the topic to open the dialog box in the program.

This command can be used only with a compiled help (.chm) file.

Syntax

<PARAM name="Command" value="ShortCut">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Item1" value="window class,program name,parameters">
<PARAM name="Item2" value="message,wParam,lParam">
<PARAM name="Window" value="Window Name">

Property | Property Description
Button | Specifies a button style.
Command | Calls the Shortcut command.
Item1 | Specifies the window class, program name, and any parameters to be sent to the program. These values are separated by commas.
Item2 | Specifies Message, wParam, and lParam. These values are separated by commas.
Window | Specifies an alternate URL (if one is selected).

Example

<OBJECT id=shortcut type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="hhctrl.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="ShortCut">
<PARAM name="Button" value="Bitmap:shortcut">
<PARAM name="Item1" value="notepad,notepad.exe,">
<PARAM name="Item2" value="273,1,1">
</OBJECT>

Comments

The Button property is omitted when this command is invoked by a script.


Splash

Purpose

Displays an image for a specified number of seconds when the HTML file that contains the HTML Help ActiveX Control is opened. For example, using the Splash command, you could display a product logo or welcome message when a compiled help (.chm) file or Web page is first opened.

This command can be used with either a compiled help file or uncompiled HTML files.

Syntax

<PARAM name="Command" value="Splash">
<PARAM name="Item1" value="image file path">
<PARAM name="Item2" value="millisecond value">
<PARAM name="Item3" value="image file path">

Property | Property Description
Command | Calls the Splash command.
Item1 | Specifies the image (.bmp, .gif, .jpg) file path. Supported image file formats are .gif, .jpg, or .bmp.
Item2 | Specifies the length of time to display the image in milliseconds (1000 milliseconds = 1 second).
Item3 | Specifies an alternate image file to display if the user's display configuration supports more than 256 colors. Optional.

Example

<OBJECT id=splash type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="Hhctrl.ocx#Version=4,72,7323,0"
>
<PARAM name="Command" value="Splash">
<PARAM name="Item1" value="test.gif">
<PARAM name="Item2" value="5000">
</OBJECT>

Sample Splash Command

Click here to see a splash screen.

Comments

You should insert the HTML Help ActiveX Control within the <BODY> start and end tags of the file. Use of the control within the <FRAMESET> start and end tags is currently not supported. If you want to use the Splash command with a frameset, insert the control within the default HTML file that is specified in the frameset document.


TCard

Purpose

Integrates training card topics into HTML Help. Training cards are help topics that communicate directly with the program. A compiled help (.chm) file can send messages to, and receive messages from, the program through the use of message parameters.

Training cards can be used to teach users how to perform a certain task or to guide them through a troubleshooting process.

An important thing to keep in mind is that code must be added to the associated program to implement training card topics.

This command can be used only with a compiled help (.chm) file.

Syntax

<PARAM name="Command" value="TCard">
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Item1" value="wParam">
<PARAM name="Item2" value="lParam">

Property | Property Description
Button | Specifies the button style.
Command | Calls the TCard command.
Item1 | Specifies the wParam parameter to pass to the WM_TCARD message. wParam identifies a button or user action. This value must be numerical.
Item2 | Specifies the lParam parameter to pass to the WM_TCARD message. Contains additional data, depending on the value of wParam. This value can be text or numerical.

Example

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="TCard">
<PARAM name="Button" value="Text: This is a training card">
<PARAM name="Item1" value="WPARAM">
<PARAM name="Item2" value="LPARAM">
</OBJECT>

Comments

The Button property is omitted when this command is invoked by a script.


WinHelp

Purpose

Displays a WinHelp topic in the WinHelp primary (main) window, a WinHelp secondary window, or in a WinHelp pop-up window. The specific window attributes such as size and position, background color, and button bar items are based on the definitions in the [WINDOWS] section of the specified WinHelp project (.hpj) file.

This command can be used only with a compiled HTML Help (.chm) file.

Syntax

<PARAM name="Command" value="WinHelp [,Popup]>
<PARAM name="Button" value="[Text:|Bitmap:|Icon:]">
<PARAM name="Item1" value="WinHelp (.hlp) file path [>window name]">
<PARAM name="Item2" value="topic ID|map number">
Property | Property Description
Button | Specifies the button style.
Command Calls the WinHelp command and specifies a WinHelp window type.

To display a pop-up WinHelp window, type Popup.

To display a secondary WinHelp window, do not specify a window type and specify a window name in the Item1 property.

To display the WinHelp main window, do not specify a window type or a window name (in the Item1 property).

Item1 Specifies the file path of the WinHelp (.hlp) file in which the WinHelp topic is stored and the window name of the target window.

Item1 values are separated by the ">" character.

Do not specify a window name if you typed Popup in the Command property or if you want the topic to appear in the WinHelp main window.

Item2 | Specifies the topic ID or map number of the WinHelp topic to display.

Example

<OBJECT id=winhelp type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="hhctrl.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="WinHelp">
<PARAM name="Button" value="Text: Candomble Overview">
<PARAM name="Item1" value="c:\winhelp\candomble_wh.hlp>MyWindow">
<PARAM name="Item2" value="myth_candomble_overview">
</OBJECT>

Comments

The Button property is omitted when this command is invoked by a script.


Compiler Information

Purpose

Inserts KLink keywords and ALink names in a target HTML file. This allows the HTML file to be a target of an ALink or KLink from another file. This command can be used only with a compiled help (.chm) file.

Syntax

<param name="Keyword" value="keyword1">
<param name="Keyword" value="keyword2">
<param name="ALink Name" value="ALink1">
<param name="ALink Name" value="ALink2">

Property | Property Description
Keyword | Specifies the text of an individual KLink keyword. Each instance must have its own individual <PARAM> tag.
ALink Name | Specifies the text of an individual ALink name. Each instance must have its own individual <PARAM> tag.

Example

<Object type="application/x-oleobject" classid="clsid:1e2a7bd0- dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="nutrition">
<param name="Keyword" value="protein">
<param name="ALink Name" value="nutrition">
<param name="ALink Name" value="protein">
</OBJECT>

Comments

  • To create a target topic using KLink keywords or ALink names, open the HTML file you want to set as a target in HTML Help Workshop. Click the Edit menu, and then click Compiler information. You will be prompted for KLink keywords or ALink names depending on which tab you select.
  • To create ALink and Klink jumps in an HTML file to target topics, use the ALink (uses ALink names) and KLink (uses KLink keywords) commands.
  • Compile-time commands use a different CLASSID value than run-time commands.


Split file

Purpose

Splits a single HTML file with multiple topics into multiple topic files during compilation. The Split File command behaves the same way that a page break behaves in a Rich Text Format (.rtf) file. The split occurs wherever an instance of the HTML Help ActiveX Control has been inserted.

The Split File command copies the basic document tags, such as the <DOCTYPE>, <HTML>, <HEAD>, and <BODY> tags from the master HTML file.

The split HTML files do not appear in the [FILES] section of the project (.hhp) file. To create links to these files in any HTML file or in your table of contents, refer to the file names specified in Split File. These HTML files are accessible only from the master HTML file until after compilation.

This command can be used only with a compiled help (.chm) file.

Syntax

<PARAM name="New HTML File" value="file name">
<PARAM name="New HTML Title" value="file title">

Property | Property Description
New HTML file | Specifies the name of the HTML file that will result from the split. Use this file name to create links and contents entries to this topic.
New HTML title | Specifies the title of the HTML file that will result from the split. If you do not specify a title, the title from the master document is copied.

Example

This example shows how one master HTML file can be split into four separate files using three instances of the HTML Help ActiveX Control.

Note that the Split File command does not require an ID attribute.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html;
charset=Windows-1252">
<title>Split File Test</title>
</HEAD>

<BODY BGCOLOR=#FFFFFF TEXT=#000000>

<p>
This is the master file that stores multiple topics. Each topic is split into an individual HTML file during compilation.
</p>

<p>
You can easily link to any topic within this master HTML file by referencing the file name specified in the Split File command.
<ul>
<li>
<a href="file_1.htm">Link to topic 1</a> <li>
<a href="file_2.htm">Link to topic 2</a> <li>
<a href="file_3.htm">Link to topic 3</a> </li>
</ul>

<p>
To include each topic in your contents (.hhc) file, reference the file name specified in the Split File command.

<!---New Topic--->
<Object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="New HTML file" value="file_1.htm">
<param name="New HTML title" value="First topic">
</OBJECT>

<h1><font color="#008000">This is the first topic</font></h1>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

A link to the <a href="file_2.htm">second topic</a>.

<h3>About the first topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
<p>
<b>Ut wisi</b>   enim ad minim veniam, quis nostrud
<p>
<b>Lobortis nisl</b>   ut aliquip ex ea commodo
<p>
<b>Exerci tation</b>   ullamcorper suscipit consequat

<h3>Even more about the first topic</h3>
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

<h3>Why you need the first topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

<ul>
<li>Ut wisi enim ad minim veniam
<li>Quis nostrud exerci tation
<li>Ullamcorper suscipit lobortis
<li>Nisl ut aliquip ex ea commodo
</li>
</ul>

<!---New Topic--->
<Object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="New HTML file" value="file_2.htm">
<param name="New HTML title" value="Second Topic">
</OBJECT>

<h1><font color="#FF0000">This is the second topic</font></h1>
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan.

<h3>About the second topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

<p>
<b>Ut wisi</b>   enim ad minim veniam, quis nostrud
<p>
<b>Lobortis nisl</b>   ut aliquip ex ea commodo
<p>
<b>Exerci tation</b>   ullamcorper suscipit consequat

<h3>Even more about the second topic</h3>
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

<h3>Why you need the second topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

<ul>
<li>Ut wisi enim ad minim veniam
<li>Quis nostrud exerci tation
<li>Ullamcorper suscipit lobortis
<li>Nisl ut aliquip ex ea commodo
</li>
</ul>

<!---New Topic--->
<Object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="New HTML file" value="file_3.htm">
<param name="New HTML title" value="Third Topic">
</OBJECT>

<h1><font color="#FF00FF">This is the third topic</font></h1>
Vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

<h3>About the third topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

<p>
<b>Ut wisi</b>   enim ad minim veniam, quis nostrud
<p>
<b>Lobortis nisl</b>   ut aliquip ex ea commodo
<p>
<b>Exerci tation</b>   ullamcorper suscipit consequat

<h3>Even more about the third topic</h3>
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

<h3>Why you need the third topic</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

<ul>
<li>Ut wisi enim ad minim veniam
<li>Quis nostrud exerci tation
<li>Ullamcorper suscipit lobortis
<li>Nisl ut aliquip ex ea commodo
</li>
</ul>

</BODY>
</HTML>

Comments

  • You can include the master HTML file in your project file. All text before the first instance of the control will appear in the master file after compilation. Any text that occurs after an instance of the control is removed and placed in the file specified for that instance of the HTML Help ActiveX Control.
  • Compile-time commands use a different CLASSID attribute than run-time commands.


About the HTML Help ActiveX Control properties

Use the HTML Help ActiveX Control (Hhctrl.ocx) properties to describe how the control should carry out a specific command. For example, you must specify a contents (.hhc) file using the Item1 property when you author the Contents command.

Properties are the part of the <PARAM> tag that tells the HTML Help ActiveX Control how to carry out a specific command.

Some properties are used with more than one command. For information about a specific instance of a property, see the command for which it is used.

HTML Help ActiveX Control properties quick reference

  • ALink Name
  • Button
  • Command
  • Flags
  • Frame
  • Item
  • Keyword
  • New HTML File
  • New HTML Title
  • Window


ALink Name

Use the ALink Name property to insert Associative link (ALink) names in a target HTML file. To link to a target file, the ALink must be added to the file you want to link from.

Applies To

Compiler Information

Possible Values

Syntax | Description | Example | Notes
Param name="ALink" value="ALink name" | Specifies the keyword that will be used to locate target topics when a user clicks an ALink jump in a compiled help file. | ... | The value for this property must match the text specified in the Item2 property of the ALink.


Button

Use the Button property to enable a command to be invoked when a user clicks a button. You can select from several button styles.

Note

  • You can invoke commands using a script instead of a button.

Applies To

Alink
Close
HH Version
KLink
Related Topics
Shortcut
TCard
WinHelp

Possible Values

Syntax | Description | Example | Notes
Param name="Button" value="Text:button text" | Button with a text label. | You can enter text of any length for the label. The text will not wrap.
Param name="Button" value="" | "Chiclet" button. | To specify a chiclet button, you can remove the Button property entirely or use empty quotation marks (value="").
Param name="Button" value="Bitmap:shortcut" Button with a shortcut icon. ...
Param name="Button" value="Bitmap:file path to .bmp file" | Button with a bitmap image. | You can specify an absolute or relative path.
Param name="Button" value="Icon:file path to .ico file" | Button with an icon. | You can specify an absolute or relative path.

Example

<OBJECT id=bitmap type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
codebase="HHCTRL.ocx#Version=4,72,7323,0"
width=100
height=100
>
<PARAM name="Command" value="HH Version">
<PARAM name="Button" value="Bitmap:bmpbutton.bmp">
</OBJECT>
link to overview topic About the HTML Help ActiveX Control properties


Command

Use the Command property to add a specific run-time HTML Help feature to an HTML file.

Applies To

Alink
Close
Contents
HH Version
Index
KLink
Related Topics
Shortcut
Splash
TCard
WinHelp

Possible Values

Syntax Description Example Notes
Param name="Command" value="<command name, [menu|dialog|popup] Specifies the command to invoke.

ALink, KLink, Related Topics, and WinHelp commands include an additional setting that specifies the window type to display targets in (dialog box or pop-up menu).

Separate multiple Command property values with a comma.

 ...
  • Compile-time commands do not require the Command property.
  • If you are using a script with the control, the Command property is not required.


Flags

Use the Flags property to specify how topics should be searched for and displayed for certain commands.

Applies To

Alink
Contents
KLink

Possible Values

Syntax | Description | Example | Notes
Param name="Flags" value="1" | Used with the ALink or KLink commands to specify that when a single target topic is found, the topic should appear in the window type specified in the Command property value. | ... | If this property is left empty (value=" "), clicking the ALink or KLink navigates directly to the target topic when a single topic is found.
Param name="Flags" value=",,1" | Used with the ALink or KLink commands to specify that when a target topic cannot be found, the ALink or KLink button (or text) should appear unavailable. | ... | If this property is left empty (value=" "), clicking the ALink or KLink opens a Topic Not Found dialog box when the topic cannot be located.
Param name="Flags" value="<Enter a valid window style numeric value>" | Used with the Contents command to store the numeric value of the selected window style attributes. | See the Contents command for examples of window styles. | The window style hexadecimal numeric values are not currently mapped. We recommend that you use the HTML Help ActiveX Control Wizard to select window styles. The Wizard automatically inserts the appropriate parameter values in the format 0xn.


Frame

Use the Frame property to specify the frame in which you want target topics to appear.

Applies To

Alink
KLink
Related Topics

Possible Values

Syntax | Description | Example | Notes
Param name="Frame" value="<Enter a valid frame name>" | If you are using a frameset, specifies the frame for the selected topic to appear in. | ... | The Frame command is optional.


Item

Item1, Item2, Item 3...

The Item property is dependent on the specified command. For usage information, see the individual commands that use this property.

Applies To

Alink
Contents
Index
KLink
Related Topics
Shortcut
Splash
TCard
WinHelp

Possible Values

Syntax Description
<param name="Item1" value=" ">
<param name="Item2" value=" ">
<param name="Item3" value=" ">

The actual values depend on the command specified.

  • Alink: Specifies .chm file path and keywords.
  • Contents: Specifies .hhc file path.
  • Index: Specifies .hhk file path.
  • KLink: Specifies .chm file path and keywords.
  • Related Topics: Specifies an entry in the Related Topics list.
  • Shortcut: Specifies information about the shortcut.
  • Splash: Specifies image file path and length of time the image will appear.
  • TCard: Specifies values to pass for wParam and lParam.
  • WinHelp: Specifies .hlp file path and topic ID (or map number).


Keyword

Use the Keyword property to insert keywords in a target HTML file. When you create a Keyword link (KLink) in a file, the link searches for all target files that contain the specified keyword. In a compiled help (.chm) file, keywords are also added to the index.

Applies To

Compiler Information

Possible Values

Syntax | Description | Example | Notes
Param name="KLink" value="<Enter Text for KLink>" | Specifies the keyword that will be used to locate target topics when a user clicks a KLink jump in a compiled help file. | ... | The value for this property must match the text specified in the Item2 property of the KLink.


New HTML File

Use the New HTML File property to specify the name of the new HTML file created by the Split File command.

Applies To

Split File

Possible Values

Syntax | Description | Example | Notes
Param name="New HTML File" value="<Enter an HTML file name>" | Specifies the name of the HTML file that will result from a file split. | ... | ...


New HTML Title

Use the New HTML Title property to specify the title of the new HTML file created by the Split File command.

Applies To

Split File

Possible Values

Syntax | Description | Example | Notes
Param name="New HTML Title" value="<Enter a document title>" | Specifies the value of the <Title> tag for the HTML file that will result from a file split. | ... | ...


Window

Use the Window property to specify the secondary window in which you want target topics to appear.

Applies To

Alink
KLink
Related Topics
Shortcut

Possible Values

Syntax | Description | Example | Notes
Param name="Window" value="<Enter a valid window name>" | If you are using one or more secondary windows, this property specifies the target window for the selected topic to appear in. | ... | The Window command is optional.


About the HTML Help ActiveX Control and scripts

You can add functionality to one or more HTML files using the HTML Help ActiveX Control in conjunction with a scripting language such as Visual Basic Scripting Edition or JScript.

For example, if you want to implement pop-up messages that appear when a user completes a specific action, such as clicking a hyperlink, you could write a small amount of script code to call the the HTML Help ActiveX Control method TextPopup.

To access an instance of the HTML Help ActiveX Control from a script, you first need to insert the control into an HTML file and provide a unique ID for it. You specify the ID in your script. Generally, your script will pass all necessary parameters to the control, which allows you to omit the <PARAM> tag when you insert the HTML Help ActiveX Control into your file.

The following example is an "open" instance of the HTML Help ActiveX Control that can be accessed by a script:

<OBJECT id=for_script type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
>
</OBJECT>

All parameters are passed to the HTML Help ActiveX Control through script code.

Note

  • If you do not specify the width and height parameters, the default size is used (100x100 pixels).


Example: Create a pop-up message

Using the HTML Help ActiveX Control, you can create a pop-up message that appears when a user clicks a specific word, phrase, or graphic in a topic. A simple JavaScript link passes all the necessary parameters to the HTML Help ActiveX Control.

This example works in both compiled help (.chm) files and uncompiled HTML files.

To insert the HTML Help ActiveX Control into a file

You can insert the control manually or by using the HTML Help ActiveX Control Wizard. This is an example of the <OBJECT> tag code:

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
>
</OBJECT>

To insert the JavaScript link into a file

The following example calls the TextPopup method of the HTML Help ActiveX Control whose ID is HHCTRL and displays the variable MyText:

<A HREF=JavaScript:HHCTRL.TextPopup(MyText,"Verdana,10",9,9,-1,-1)
Title="Example of the TextPopup method.">
Click to see a pop-up window.</A>

A sample of the resulting link is shown below:

Click to see a pop-up window

In this example, the variable MyText contains the actual text that appears in the pop-up window. You can embed multiple variables in your HTML file or store them in a text file.

The other settings specify font face and size (Verdana, 10 point), left and right margins (9,9), and the foreground and background colors (-1, -1). The Title attribute specifies the text that displays when a user hovers the mouse over the hyperlink. Title is similar to the ALT atribute of the <IMG> tag.

Notes

  • Margin values are expressed in pixels.
  • Colors are expressed as RGB values. In HTML Help version 1.1, we recommend that you use the default value of -1 for both the text and background color.

Text formatting examples

You can select alternate values for the margin and color values. A conversion table will soon be available to convert RGB values. Here are some examples of pop-up windows with formatted text:

  • The default pop-up fonts and colors.
  • The side margin at a value of 99 pixels.
  • The top margin at a value of 99 pixels.
  • The text color at a value of 8855416.
  • The background color at a value of 0.

To embed the pop-up text variables in an HTML file

The text variables for each pop-up window can be embedded in the HTML file using the <SCRIPT> tag. You can store an unlimited number of variables using this method.

This example shows two variables and their values:

<script>
Text1="The text for the first pop-up."
Text2="The text for the second pop-up."
</script>

To reference the pop-up text variables in a text file

The text variables for all pop-up messages can be stored in one text file with the .js file name extension. This enables you to store the pop-up text messages from several HTML pages in one location. This also enables you to globally define the font face and font size to be used for pop-up messages.

To do this, you need to insert the <OBJECT> tag and the Javascript code between the <HEAD> start and end tags of each HTML file that contains pop-ups. This code contains the link to the master text file ("terms.js" in this example), and also contains an error message that will appear if the master text file cannot be found. Add the code as follows:

<OBJECT id=HHCTRL type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >
</OBJECT>

<SCRIPT language=jscript
SRC="terms.js">
document.write("Included JScript file not found");
</SCRIPT>

Next, create a text file with the .js file name extension. Make sure to give it the same name as the file you specified in the JavaScript tag. The format of the text file is as follows:

popfont="Verdana,10"
Text1="The text for the first pop-up."
Text2="The text for the second pop-up."

where popfont is the name of the variable that defines the font face and font size for all pop-up messages.

The JavaScript code used for each link is similar to the first example, except a variable is specified in place of an actual font face and font size.

<A HREF="JavaScript:HHCTRL.TextPopup(Text1,popfont,9,9,-1,-1)"
Title="Click for pop-up definition">Word to be defined</A>

If you want, you can substitute the link text with an image by using the <IMG> tag. You can also trigger a pop-up window from an image map link.

To trigger a pop-up window from an image map

  1. Insert the <OBJECT> tag into an HTML file.
  2. Insert the HTML code for the image, the image map, and a script for the text variables. You can store the text variables in a text (.js) file.

    The image

    <img src="test.gif" usemap="#test" BORDER=0 WIDTH=216 HEIGHT=216>

    The image map

    For each defined area of the image map, add a JavaScript link that calls the TextPopup method of the HTML Help ActiveX Control.

    <MAP NAME="test">

    <AREA SHAPE=RECT COORDS="4,2,108,103" A A HREF="JavaScript:HHCTRL.TextPopup(square1,popfont,9,9,-1,-1)" Title="Square 1">

    <AREA SHAPE=RECT COORDS="117,6,212,104" HREF="JavaScript:HHCTRL.TextPopup(square2,popfont,9,9,-1,-1)" Title="Square 2">

    <AREA SHAPE=RECT COORDS="3,111,105,213" HREF="JavaScript:HHCTRL.TextPopup(square3,popfont,9,9,-1,-1)" Title="Square 3">

    <AREA SHAPE=RECT COORDS="114,113,211,210" HREF="JavaScript:HHCTRL.TextPopup(square4,popfont,9,9,-1,-1)" Title="Square 4"> </MAP>

    The text variables

    <SCRIPT Language=JavaScript>
    popfont="Verdana,10"
    square1="Welcome to Square 1!"
    square2="This is Square 2!"
    square3="Welcome to Square 3!"
    square4="Square 4 welcomes you!"
    </SCRIPT>

The resulting image map with pop-up text messages

link to overview topic About using the HTML Help ActiveX Control with scripts


Example: Use a thumbnail graphic to link to a large graphics file

You can use the HTML Help ActiveX Control to link to a large graphic from a small "thumbnail" representation. When a user clicks a thumbnail graphic, the large graphic appears in a secondary window, leaving the main help topic in its original state. This example is based on the Related Topics command.

The five steps of the process are as follows:

  1. Create a thumbnail graphic.
  2. Define a secondary window to display the main graphic.
  3. Add each graphics file to your project (.hhp) file.
  4. Add the HTML Help ActiveX Control to your HTML file.
  5. Compile your help project.

Note

  • You can only use this example with a compiled help (.chm) file.


Sample Close command

This page demonstrates the use of the Close command.


Compiler Information

Methods placeholder

Purpose

These topics are under construction.

Parameter Name | Parameter Values

Example

Notes

link to overview topic About the HTML Help ActiveX Control methods


About the HTML Help ActiveX Control methods

This topic is under construction.

Methods

Click

TextPopup

Example

Using the Click method, the following JavaScript code calls the ALink command when a user clicks the specified text (in the example, "This is a text link").

</object>
<a href=JavaScript:HHCTRL.Click()>This is a text link</a>


To create a thumbnail graphic

  • Use a graphic editing program to create a small version of your main artwork. This will be the thumbnail that users click to view the large graphic.

Notes

  • You can also create a smaller version of the original graphic by inserting an <IMG> tag into your HTML file and changing the WIDTH and HEIGHT attributes to size down the graphic.


To define a secondary window to display the main graphic

  1. In HTML Help Workshop, open a project (.hhp) file, and then click Add/Modify Window Definitions.
  2. Type a name of up to eight characters for the secondary window you are adding.
  3. Click the General, Buttons, Position, Files, Navigation Pane, Styles and Extended Styles tabs to create the features you want for your secondary window.

Note

  • This will be the value for the Window parameter in the <OBJECT> tag.


To add each graphics file to your project file

  1. Open a project (.hhp) file, and then click Add/Remove Topic Files.
  2. In the Topic files box, click Add.
  3. In the File name box, type the name of the graphics file, and then click Open.
  4. Repeat steps 2 and 3 for each graphics file you need to reference, including thumbnail files, if they have different file names.

Notes

  • This ensures that the graphics files will be compiled with the rest of the files in the project.
  • The graphics files should reside in the same directory as the project file.


To add the HTML Help ActiveX Control to the HTML file

  1. Copy the following Javascript link into your file between the <BODY> start and end tags:

    <a href=javascript:thumb.Click()>
<img src="thumbnail.gif"
border=2></a>

    where thumbnail.gif is the name of the thumbnail graphics file you created.

  2. Copy the following HTML Help ActiveX Control syntax into your file:

    <OBJECT id=thumb type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Related Topics">
<PARAM name="Window" value="art window">
<PARAM name="Item1" value="Topic Title;file.chm::/main_art.gif">
</OBJECT>

    where art window is the window name you specified in the Define a secondary window to display the main graphic topic and Topic Title;file.chm::/main_art.gif specifies a "friendly" name for the graphics file you are linking to (you can type anything, or leave the default in place), the name of the compiled help file you are working in, and the name of the large graphics file you want to link to.


To compile your help project file

  • Open a project (.hhp) file, and then click Compile HTML File.


Sample Splash command

This page demonstrates the use of the Splash command. The timeout for this splash screen is set for 5 seconds. Click the image to dismiss the splash window before the allotted time.

link to overview topic Splash command


HTML Help window types

When using the ALink, KLink, and Related Topics commands, specify one of the following window types using the Command property:

Topics Found dialog box

Pop-up menu

Note

  • If you do not specify a window type, the Topics Found dialog box is used by default.


WinHelp window types

When using the WinHelp command, specify one of the following WinHelp window types using the Command property:

Pop-up WinHelp window

This graphic is not yet available

Secondary WinHelp window

This graphic is not yet available

Primary WinHelp window (main)

This graphic is not yet available

Notes

  • The specific window attributes such as size and position, background color, and button bar items are based on the definitions in the [WINDOWS] section of the specified WinHelp project (.hpj) file.
  • If you do not specify a window type or a window name, the main window is used.


Default window style attributes for the Contents command

The default window settings for the Contents command include:

  • Border
  • Plus/Minus Squares
  • Show Selection When Focus Lost
  • Start Line From the Root
  • Sunken Edge

A default table of contents

Default window style attributes

Border

Displays a border around the parameter of the control.

This graphic is not yet available

Note

  • To clear the Border attribute, the Sunken Edge and Raised Edge attributes must also be cleared.

Plus/Minus Squares

Add a plus (+) sign to collapsed top level topics and a minus (-) sign to expanded top level topics. Double-clicking a top level topic switches between expanded and collapsed views. Use this attribute in conjunction with Start Line From the Root.

This graphic is not yet available

Show Selection When Focus Lost

Causes the selected topic title to remain highlighted in the Navigation pane if the user clicks outside of the Navigation pane.

This graphic is not yet available

Start Line From the Root

Adds a vertical line between items starting from the topmost item. Use this attribute in conjunction with Plus/Minus Squares.

This graphic is not yet available

Sunken Edge

Adds the look of a sunken edge to the control when used with the Border attribute. This cannot be used in conjunction with the Raised Edge attribute.

This graphic is not yet available


Other window style attributes of the Contents command

  • Dialog Frame
  • Draw Lines Between Items
  • Raised Edge
  • Right-to-Left Reading Order
  • Scroll Bar on Left Side

Dialog Frame

Displays the table of contents with a dialog box style border.

Draw Lines Between Items

Makes lines visible between items in the tree view.

Raised Edge

Adds the look of a raised edge to the control when used with the Border attribute. This cannot be used in conjunction with the Sunken Edge attribute.

This graphic is not yet available

Right-to-Left Reading Order

Causes the tree view menu hierarchy to expand from right to left. This is useful for a language that reads right to left, such as Hebrew.

This graphic is not yet available

Scroll bar on left side

Causes the vertical scroll bar to appear on the left side of the control. This is useful for a language that reads right to left such as Hebrew.

This graphic is not yet available