AnnSetAutoMenuItemEnable method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax short AnnSetAutoMenuItemEnable (OLE_HANDLE hObject, short iType, short iItem, short iEnable, short iFlags, BSTR pszUserList);

Overview:  Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enables or disables a menu item for one or more annotation objects.

By default, all automation menu items that are not NULL are displayed.

If an automation menu item is NULL, that menu item will not be displayed, even if the menu item has been enabled using this method.

The menu item strings are changed using the AnnSetAutoText method.

Menu items can be enabled or disabled for one or more than one object, depending on the object passed in the hObject parameter. The following table indicates the possible options:

Menu Item String

Status

hObject

iType

Result

NULL

Enabled

Annotation or automation

Any type

Menu item is not displayed.

NULL

Disabled

Annotation or automation

Any type

Menu item is not displayed.

Not NULL

Disabled

Automation object

ANNOBJECT_XXX

Menu item is not displayed for all objects of type ANNOBJECT_XXX.

Not NULL

Disabled

Automation object

ANNOBJECT_ALL

Menu item is not displayed for all objects.

Not NULL

Enabled

Automation object

ANNOBJECT_XXX

Menu item is displayed for all objects of type ANNOBJECT_XXX.

Not NULL

Enabled

Automation object

ANNOBJECT_ALL

Menu item is displayed for all objects.

Not NULL

Disabled

Annotation object

Ignored

Menu item is not displayed for the specified object, based on the value of uFlags.

Not NULL

Enabled

Annotation object

Ignored

Menu item is displayed for the specified object, based on the value of uFlags.

See Also

Elements:  AnnGetAutoMenuItemEnable, AnnAutoMenuEnable property

Topics:  Annotations (Document/Medical only): Automation