L_AnnGetAutoMenuState

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetAutoMenuState(hObject, nObjectType, pEnable, pEnableFlags, uBits)

HANNOBJECT hObject;

/* handle to the annotation object */

L_INT nObjectType;

/* type of annotation object */

L_UCHAR * pEnable;

/* an array of bit flags */

L_UCHAR * pEnableFlags;

/* an array of bit flags */

L_UINT uBits;

/* number of bits in pEnable and pEnableFlags */

Retrieves the automation menu state.

This function is available in the Document and Medical Imaging toolkits.

Parameter

Description

hObject

Handle to the annotation object.

nObjectType

Constant that specifies an object's type. For descriptions of possible object types, refer to Types of Annotations. This parameter is valid only if hObject is an automation object.

pEnable

An array of bit flags that is updated with values that specify whether the corresponding menu item specified in pEnableFlags is enabled or disabled. The bits in the pEnable array are ordered just like the bits in the pEnableFlags array. Therefore, if pEnableFlags[0] & 0x40 == 1 is true, and pEnable[0] & 0x40 == 1 is also true, then the ANNAUTOTEXT_MENU_CUT menu item will be displayed, based on the values of hObject and uFlags.

pEnableFlags

An array of bit flags that is updated with values that indicate which menu items have been changed from their default behavior. The bits are ordered from most significant to least significant. Therefore, pEnableFlags[0] contains flags for menu items 0, 1, 2, 3, 4,5, 6, 7. This corresponds to ANNAUTOTEXT_MENU_UNDO,

ANNAUTOTEXT_MENU_CUT,

ANNAUTOTEXT_MENU_COPY,

ANNAUTOTEXT_MENU_PASTE,

ANNAUTOTEXT_MENU_DELETE,

ANNAUTOTEXT_MENU_SELECTALL,

ANNAUTOTEXT_MENU_BRINGTOFRONT, and

ANNAUTOTEXT_MENU_SENDTOBACK.

For example, if pEnableFlags[0] & 0x40 == 1 is true, the ANNAUTOTEXT_MENU_CUT menu item has been changed from its default behavior. To determine whether the menu item is enabled or disabled, check the corresponding bit flag in pEnable.

uBits

Number of bits in the pEnableFlags and pEnable arrays. The number of bytes pointed to by pEnable and pEnableFlags can be determined using the following equation: Bytes = (uBits + 7) / 8.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If a bit in the pEnableFlags array is set to 1, then the corresponding bit in the pEnable array determines whether the corresponding menu item will be displayed or not. If the corresponding bit in pEnable is one, the menu item will be displayed, provided the menu item string is not NULL. If the corresponding bit in pEnable is 0, the corresponding menu item will not be displayed.

If a bit in pEnableFlags is 0, the corresponding bit in pEnable is ignored, and the menu item is displayed or not displayed based on the default behavior.

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 2000 / XP/Vista.

See Also

Functions:

L_AnnSetAutoMenuState,

 

L_AnnGetAutoMenuItemEnable,

 

L_AnnSetAutoMenuItemEnable,

 

L_AnnSetAutoText, L_AnnGetAutoText, L_AnnSetAutoHilightPen, L_AnnSetAutoSnapCursor, L_AnnGetAutoSnapCursor

Topics:

Annotation Functions: Implementing Automation

 

Implementing Annotations

 

Automated User Interface for Annotations

 

Implementing an Automated Annotation Program

 

Obtaining Annotation Object Information

 

Annotation Functions (Document/Medical only): Automation Properties

Example

For an example, refer to L_AnnSetAutoMenuState.