Feedback

  • Contents
 

II3IDMenuManager2::AddMenuItem2 Method

Synopsis

Adds a new menu item below the Preferences menu instead of the Utilities menu.

IDL Function Prototype

HRESULT AddMenuItem2(

   [in] I3IDMenuLocation ParentMenu,

   [in] BSTR MenuItemText,

   [in, optional, defaultvalue(0)] VARIANT_BOOL Checked,

   [in, optional, defaultvalue(0)] VARIANT_BOOL Enabled,

   [in, optional] VARIANT MenuEventNotifier,

   [out, retval] II3IDMenuIem ** NewMenu

);

C/C++ Syntax

HRESULT AddMenuItem2( I3IDMenuLocation ParentMenu, BSTR MenuItemText, VARIANT_BOOL Checked, VARIANT_BOOL Enabled, VARIANT MenuEventNotifier, II3IDMenuIem ** NewMenu);

Parameters

ParentMenu

An 3IDMenuLocation constant that identifies which menu will host the new menu item.

MenuItemText

Text that you want the user to see as the menu selection.

Checked

Boolean that determines whether or not this menu item has a checkbox next to it.

Enabled

Boolean that determines whether or not the new menu item is enabled or disabled.

MenuEventNotifier

Specifies what object Interaction Designer should call to process a menu event. This can be a variant that contains an IDispatch pointer, an IUnknown pointer, or a BSTR. If you specify a BSTR in the VARIANT, Interaction Designer will treat that string as a ProgId, create the object using that ProgId and QueryInterface the created object for an II3IDMenuEvents interface pointer. For an IDispatch or IUnknown pointer, Interaction Designer will call QueryInterface on that pointer for the II3IDMenuEvents interface.

NewMenu

The return value is a new II3IDMenuItem object.