If a macro is defined for a menu item or button, Windows Help executes that macro when the user chooses the menu item or button. The macros can be defined in the [CONFIG] section of the Help project file or in a topic footnote. Macros that affect Help buttons, menus, or menu items remain in effect until the user displays a topic that changes the item’s function, opens a new Help file, or quits Windows Help.
The following macro executes when the user chooses a menu item:
AppendItem("mnu_util", "mnu_icon", "&Create Icon", "ExecProgram(`imagedit.exe', 0)")
This macro performs the following operation:
nAppendItem adds an item to the Utilities menu that starts the ImageEdit application when the user chooses the menu item.
The following macro executes when the user chooses a button:
ChangeButtonBinding("btn_contents", "JumpID(`hgcd.hlp', `acc_idx_hg')")
This macro performs the following operation:
nChangeButtonBinding changes the standard function of the Contents to jump to a specific topic within the Help file.