Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- menuType
- The MenuType Context or Toolbar.
- tool
- If the MenuType is Toolbar, then the Tool parameter is the Tool that the menu is associated with. An AnnotationTool enumeration. If the %% is Context, the Tool parameter has no meaning and can be any value.
- topMenuId
- Top-level menu Id for this menu item. A menu id of 4100-4200 is reserved for adding a menu separator bar. The topMenuId of the new item MUST be 20000 or greater for user added items.
- 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.
This method lets you add new items to the Context Menu and receive event notifications when these items are selected.
See the TopMenuId and the SubMenuId enumerations for a list of predefined data.