AppendItem

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

Syntax

AppendItem("menu-id", "item-id", "item-name", "macro")

Parameter Description

menu-id Name used in the InsertMenu macro to create the menu. This name must be enclosed in quotation marks. The new item is appended to this menu.
item-id Name that Windows Help uses internally to identify the menu item. This name is case sensitive and must be enclosed in quotation marks.
item-name Name that Windows Help displays on the menu for the item. This name is case sensitive and must be enclosed in quotation marks. Within the quotation marks, place an ampersand (&) before the character you want to use for the macro’s accelerator key.
macro Help macro or macro string that executes when the user chooses the menu item. The macro must be enclosed in quotation marks. Separate multiple macros in a string with semicolons (;).

Example

The following macro appends a menu item labeled Example to a View menu identified by the “mnu_view” context string:

AppendItem("mnu_view", "mnu_example", "E&xample", "JI(`charts.hlp',
`eg_012_topic')")

Choosing the menu item causes a jump to a topic with the “eg_012_topic” context string in the CHARTS.HLP file. Note that the letter x serves as the accelerator key for this menu item.

Comments

Be sure that the accelerator key you assign to a menu item is unique. If you assign a key that conflicts with another menu access key, Windows Help displays an “Unable to add item” error message and ignores the macro.

Windows Help ignores this macro if it is executed in a secondary window.

See Also

ChangeItemBinding, CheckItem, DeleteItem, DisableItem, EnableItem, InsertItem, InsertMenu, UncheckItem