LAnnotation::GetAutoMenuState

#include "ltwrappr.h"

virtual L_INT LAnnotation::GetAutoMenuState(nObjectType, pEnable, pEnableFlags, uBits)

Retrieves the automation menu state.

Parameters

L_INT nObjectType

Constant that specifies an object's type. For descriptions of possible object types, refer to Types of Annotations.

L_UCHAR * 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 uFlags.

L_UCHAR * 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:

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.

L_UINT 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

Value Meaning
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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LAnnotation::SetAutoMenuState.

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help