The AddMenuItem transaction adds the defined command or separator to the specified menu.
Type XTYP_EXECUTE
Syntax [AddMenuItem(menuID, cmdID, menuItemType, "pRelMenuItem", relPsn)]
|
Parameter |
Data type |
Values |
Meaning |
|
menuID |
WORD |
|
identifier of the menu to add an item to: |
|
|
|
1 |
main Imagenation menu bar |
|
|
|
2 |
Layers window menu |
|
|
|
3 |
Detail window menu |
|
|
|
4 |
Symbols palette menu |
|
cmdID |
WORD |
1 |
insert separator |
|
|
|
identifier of the command to insert | |
|
menuItemType |
WORD |
4 |
creates a new menu that will have commands under it |
|
|
|
5 |
creates a submenu that will have commands under it |
|
|
|
6 |
creates a command or separator |
|
pRelMenuItem |
command relative to which the new item will be inserted. If the item is not on the first level, use periods to indicate the level. for example, if relative to File, Open use 100.101, not just 101. | ||
|
relPsn |
WORD |
1 |
place new item first in the menu |
|
|
|
2 |
place new item last in the menu |
|
|
|
3 |
place new item before the pRelMenuItem |
|
|
|
4 |
place new item after the pRelMenuItem |
Remarks
Only commands available in your edition of Imagenation can be added.
You cannot create a new blank menu. You must attach the new item to an existing menu.
You must use the ResetMenus transaction to update the user interface with the change.
Release information
Added in Release 4.5.
See also