- Menu
Value Description Menu_Context Context menu activated. Menu_Toolbar Toolbar menu activated. If the menu is Toolbar, the Tool parameter is the Tool ID that the menu is associated with.
If the menuType is Context, then the Tool parameter has no meaning and can be any value.
- Tool
Value Description TOOL_Hand Image panning tool. TOOL_Mag Magnifying window. TOOL_MouseWheelHorizScroll Mouse wheel horizontal scroll. TOOL_MouseWheelVertScroll Mouse wheel vertical scroll. TOOL_MouseWheelZoom Mouse wheel zoom. TOOL_None No tool selected. TOOL_Pan Image viewing pan tool. TOOL_Select Rubberband window selection tool. TOOL_ZoomIn Zoom in tool. TOOL_ZoomOut Zoom out tool. TOOL_ZoomRect Zoom rectangle tool. - TopMenuID
- Top-level menu Id for this menu item. A menu id of 4100-4200 is reserved for adding a menu separator bar.
- SubMenuID
- Sub-level menu Id for this menu item, if this is to add a sub-level menu item otherwise this parameter should be 0.
- MenuText
- The text that will be displayed for this menu item.
- User1
- A long value that will be passed back in a MenuSelect event.
- User2
- A long value that will be passed back in a MenuSelect event.
The MenuAddItem method adds a new menu item to the specified menu. If the Menu is Toolbar, then the Tool parameter is the Tool ID that the menu is associated with.
If the Menu is Context, the Tool parameter has no meaning and can be any value.
If the menu item is to be a top-level menu item, then the SubMenuID should be 0. A SubMenuID menu item can only be added when a TopMenuID has been added with a previous SubMenuID set to 0.
Note: The Toolbar must be activated before any context menus can be modified.