Macro Definitions

Following is an alphabetical listing of all the Windows Help Macros. When you use the Doc-To-Help Macro Editor, you'll see an explanation for each macro when you select that macro from a drop-down list. More details on Help Macros can be found in the Help Author's Guide.

Macro Name

Description

About

Displays the About dialog box.

AddAccelerator (AA)

Assigns a Help macro to an accelerator key (or key combination) so that the macro is run when the user presses the accelerator key(s).

ALink

Searches for keywords specified by A footnotes.

Annotate

Displays the Annotation dialog box.

AppendItem

Appends a menu item to the end of a menu you create with the InsertMenu macro.

Back

Displays the previous topic in the Back list. The Back list includes the last 40 topics the user has displayed since starting WinHelp.

BackFlush

Removes the back history list from the current window. This macro does not affect the history list displayed in the History window.

BookmarkDefine

Displays the Define dialog from the Bookmark menu.

BookmarkMore

Displays the More dialog from the Bookmark menu. The More command appears on the Bookmark menu if the menu lists more than nine bookmarks.

BrowseButtons

Adds browse buttons to the button bar.

ChangeButtonBinding

Assigns a Help macro to a Help button.

ChangeEnable (CE)

Assigns a macro to a button bar button and enables that button.

ChangeItemBinding (CIB)

Assigns a Help macro to an item previously added to a Windows Help menu using the AppendItem macro.

CheckItem (CI)

Places a checkmark beside a menu item.

CloseSecondarys (CS)

Closes all but the current secondary window.

CloseWindow

Closes either a secondary window or the main Help window.

Compare

Displays a Help file in a second instance of WinHelp. The current Help file and the second Help file are displayed side-by-side. Most actions performed in one Help file will be automatically reflected in the other file.

Contents

Displays the Contents topic in the current Help file.

ControlPanel

Opens a control panel applet with a specific tab on top.

CopyDialog

Displays the Copy dialog from the Edit menu.

CopyTopic

Copies all the text in the currently displayed topic to the Clipboard.

CreateButton (CB)

Adds a new button to the button bar.

DeleteItem

Removes a menu item that was added by using the AppendItem macro.

DeleteMark

Removes a text marker added with the SaveMark macro.

DestroyButton (DB)

Removes a button added with the CreateButton macro.

DisableButton

Grays out a button added with the CreateButton macro. This button cannot be used in the topic until an EnableButton macro is executed.

DisableItem (DI)

Grays out a menu item added with the AppendItem macro. The menu item cannot be used in the topic until an EnableItem macro is executed.

EnableButton (EB)

Re-enables a button disabled with the DisableButton macro.

EnableItem (EI)

Re-enables a menu item disabled with the DisableItem macro.

EndMPrint

Dismisses the printing message box and terminates the printing of multiple topics.

ExecFile (EF)

Runs a program or runs a program and opens a specified file.

ExecProgram (EP)

Executes a Windows application.

Exit

Exits the Windows Help application: the same effect as selecting Exit from the File menu.

ExtAbleItem

Enables or disables a menu item.

ExtInsertItem

Inserts a menu item at a given position on an existing menu.

ExtInsertMenu

Inserts a submenu in a previously defined menu.

FileExist

Checks to see whether the specified file or program exists.

FileOpen

Displays the Open dialog box from the File menu.

Find

Displays the Find tab in the Help Topics dialog box.

Finder

Displays the Help Topics dialog box.

FloatingMenu

Displays the context (floating) menu at the current mouse cursor position. This menu also appears when users click a topic using their right mouse button.

Flush (FH)

Causes WinHelp to process any pending messages, including previously called macros.

FocusWindow

Changes the focus to the specified window, either the main Help window or a secondary window.

Generate

Posts a message to the currently active Help window.

GotoMark

Jumps to a marker set with the SaveMark macro.

HelpOn

Displays the Help file for the Windows Help application. The macro carries out the same action as choosing the How to Use Help command on the Help menu.

HelpOnTop

Toggles the authored on-top state of a Help window.

History

Displays the history list, which shows the last 30 topics the user has viewed since opening a Help file in Windows Help. It has the same effect as choosing the History button.

IfThen

Executes a Help macro if a given marker exists, using the IsMark macro to make the test. The result of the test can be reversed by enclosing the IsMark macro within the Not macro.

IfThenElse

Executes one of two Help macros depending on whether or not a marker exists, as tested by the IsMark macro. The result of the test can be reversed by enclosing the IsMark Macro within the Not macro.

InitMPrint

Initializes WinHelp in preparation for printing multiple topics.

InsertItem

Inserts a menu item at a given position on an existing menu. The menu can be either one you create with the InsertMenu macro or one of the standard Windows Help menus.

InsertMenu

Inserts a new menu in the Windows Help menu bar.

IsBook

Determines whether WinHelp is running as a standalone system (a double-clicked book icon), or if it is being run from a program. This macro can be used as the first parameter of an IfThen or IfThenElse macro to take specific action depending on whether the current Help file is being run as a double-clicked book icon.

IsMark

Used with IfThen and IfThenElse to determine if a text marker previously created with the SaveMark macro exists.

IsNotMark

Tests whether or not a marker that was set by the SaveMark macro exists.

JumpContents

Jumps to the Contents topic of a specified Help file.

JumpContext (JC)

Jumps to a topic identified by a context number. The context is identified by an entry in the [MAP] section of the HPJ file.

JumpHash

Jumps to a topic identified by a hash number.

JumpHelpOn

Jumps to the Contents topic of the How to Use Help file. The How To Use Help file is either the default WINHELP.HLP or WINHLP32.HLP.

JumpId (JI)

Jumps to the topic with the specified context string in the Help file.

JumpKeyword (JK)

Loads the indicated Help file, searches through the K keyword table, and displays the first topic containing the index keyword specified in the macro.

KLink

Searches for keywords specified by K-footnotes.

MPrintHash

Prints a topic identified by a hash number. This macro must be used in conjunction with the InitMPrint and EndMPrint macros.

MPrintId

Prints a topic. This macro must be used in conjunction with the InitMPrint and EndMPrint macros.

Next

Displays the next topic in the browse sequence for the Help file.

NoShow

Prevents a Help window from being displayed if it has not already been displayed.

Not

Returns zero (FALSE) if the marker text specified by the SaveMark macro exists or non-zero (TRUE) if the marker text does not exist. When used with a macro, the Not macro reverses the results of the macro. Used with IfThen and IfThenElse to determine if a text marker previously created with the SaveMark macro does not exist.

PopupContext (PC)

Displays in a pop-up window the topic identified by a specific context number.

PopupHash

Displays in a pop-up window the topic identified by a hash number.

PopupId (PI)

Displays a topic from a specified file in a pop-up window.

PositionWindow

Sets the size and position of a window.

Prev

Displays the previous topic in the browse sequence for the Help file. If the currently displayed topic is the first topic of a browse sequence, this macro does nothing.

Print

Sends the currently displayed topic to the printer. It should be used only to print topics in windows other than the main Help window (for example, topics in a secondary window).

PrinterSetup

Displays the Printer Setup dialog box from the File menu.

RegisterRoutine (RR)

Registers a function within a DLL as a Help macro.

RemoveAccelerator

Removes the assignment of a macro to an accelerator key or key combination.

ResetMenu

Deletes all added menus and menu items, restores and enables all standard menu items, and restores the item bindings of all standard menu items to their defaults.

SaveMark

Saves the location of the currently displayed topic and file and associates a text marker with that location. The GotoMark macro can then be used to jump to this location.

Search

Displays the dialog for the Search button, which allows users to search for topics using keywords defined by the K footnote character.

SetContents

Designates a specific topic as the Contents topic in the specified Help file.

SetHelpOnFile

Designates the specific Help file that replaces WINHELP.HLP, the default Using Help file in the Windows environment. This macro is obsolete in Windows 95 and will be ignored.

SetPopupColor

Sets the background color for all subsequent pop-up windows.

ShellExecute

Opens or prints the specified file.

ShortCut

Runs the specified program if it is not already running. If the specified program is running, WinHelp activates it. If the wParam parameter is specified, a WM_COMMAND message with the specified wParam and lParam values are sent to the program.

TCard

Sends a message to the program that is invoking WinHelp as a training card.

Test

Runs an internal WinHelp test.

TestALink

Tests whether an ALink macro has an effective link to at least one topic.

TestKLink

Tests whether a KLink macro has an effective link to at least one topic.

UncheckItem (UI)

Removes a check mark besides a menu item.

UpdateWindow

Jumps to the topic with the specified topic ID in the specified window, and then returns the focus to the window that called the macro.