The CreateMenuItem command inserts a new menu item into a menu or menu bar at specified position.
Syntax
Integer=MenuHandle
String$='ItemText, ItemPosition, ModifyFlags'
PluginSet("PlugIn","Integer")
PluginSet("PlugIn","String$")
PluginRun("PlugIn","CreateMenuItem")
PluginGet("PlugIn","MenuItemID/MenuHandle")
Parameters
MenuHandle
[in] Handle to the menu to be changed. It can be popup/drop-down menu handle, submenu handle or one of two predefined values:
0
1
ItemText
[in] Specifies the text of the new menu item. Value '-' in this parameter indicates that the new menu item is separator.
Beside menu item text this parameter can specify access key for the menu item. An access key is an underlined letter in the text of a menu item. When a menu is active, the user can select a menu item by pressing the key that corresponds to the item's underlined letter.
To create an access key for a menu item, precede any character in the item's text string with an ampersand. For example, the text string "&Close" causes the system to underline the letter "C".
In addition to having an access key, a menu item can have a shortcut key associated with it. A shortcut key is different from an access key, because the menu does not have to be active for the shortcut key to work. You can specify shortcut key as part of ItemText parameter.
Text that identifies the shortcut key is added to the menu item text string. The shortcut text appears to the right of the menu item name, after tab character (CHR(9)).
ItemPosition
ModifyFlags
MenuItemID/MenuHandle