Feedback

  • Contents
 

II3IDMenuManager::AddMenuItem Method

Synopsis

This method adds a menu item to Interaction Designer's Utility Menu.

IDL Function Prototype

HRESULT AddMenuItem(

   [in] BSTR MenuItemText, 

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

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

   [in, optional] VARIANT MenuEventNotifier,

   [out, retval] II3IDMenuItem ** NewMenu

);

C/C++ Syntax

HRESULT AddMenuItem(BSTR MenuItemText, VARIANT_BOOL Checked, VARIANT_BOOL Enabled, VARIANT MenuEventNotifier, II3IDMenuItem ** NewMenu);

Parameters

MenuItemText

The text that will appear as the menu item.

Checked

This Boolean determines whether or not the menu item is checked.

Enabled

If this value is False, the menu item appears, but is dimmed out.

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 an II3IDMenuItem object.