ANNBUTTON

typedef struct _ANNBUTTON
{
   L_UINT uFlags;
   L_UINT uTool;
   L_UINT uToolCount;
   pANNTOOL pTools;
   pBITMAPHANDLE pBitmapUp;
   pBITMAPHANDLE pBitmapDown;
#ifdef WIN32
   L_INT nToolTipTextID;
   L_TCHAR L_FAR *pToolTipText;
#endif
} ANNBUTTON, L_FAR *pANNBUTTON;

The ANNBUTTON structure contains information about buttons contained in the annotation toolbar. [Document/Medical]

 

Member

Description

uFlags

Flag that indicates whether this button contains multiple tools. Possible values are:

 

Value

Meaning

 

0

Only one tool is associated with this button.

 

ANNBUTTON_MULTIPLE

This button has more than one tool is associated with this button.

uTool

Value that indicates the tool associated with this button, if this button has only one tool. If this button has more than one tool, this is the default tool for the button.

uToolCount

The number of tools associated with this button if ANNBUTTON_MULTIPLE is set in uFlags.

pTools

An array of tools associated with this button if ANNBUTTON_MULTIPLE is set in uFlags.

pBitmapUp

Pointer to the bitmap handle that references the bitmap that is displayed when the button is not pressed. This bitmap must be specified. The bitmap should have one of the following sets of dimensions, depending on the toolbar style being used:

image\sqrblit.gif if the old style toolbar is being used, the dimensions should be TOOLBARIMAGECX x TOOLBARIMAGECY

image\sqrblit.gif if the new XP style toolbar is being used, the dimensions should be TOOLBARIMAGEXP_CX x TOOLBARIMAGEXP_CY

When using the old style toolbar, it is recommended that all bitmaps for the annotation buttons should use the same palette.

pBitmapDown

Pointer to the bitmap handle that references the bitmap that is displayed when the button is pressed. You can use the same pointers for pBitmapUp and pBitmapDown.

nToolTipTextID

Index into the annotation menu dialog strings (ANNAUTOTEXT_XXX). If this value is -1, the text for the tool tip is in pToolTipText. If this value is >= 0, this value is an index into the set of annotation menu dialog strings and the tool tip text will come from here.

pToolTipText

Character string that contains the text for the tool tip. This is only valid if nToolTipTextID is -1.

Comments

An array of ANNBUTTON structures is used both to retrieve information about tool buttons in the existing toolbar, and to set information about tool button to set in the tool bar. For an example showing the use of this structure, refer to LAnnToolBar::FreeToolBarButtons.

Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() macro to calculate this value. Functions that do not require the structure be initialized will take the total size of the structure, in bytes, as an additional function parameter.

Beginning with Version 14.5, two different toolbar styles are available, the original style and a new XP style.

The following figure displays a sample of the original style and the new style:

Note:

In Version 14.5, you need to first enable the display of the XP style toolbar by calling the LAnnotation::SetOptions function with the ANN_OPTIONS_NEW_TOOLBAR flag set. For more information, refer to New Annotation Features of Version 14.5.

If you are using the new style annotation toolbar, the dimensions of the bitmap should be

TOOLBARIMAGEXP_CX by TOOLBARIMAGEXP_CY pixels. The bitmap should be 32 bits per pixel (24 bits per pixel with an 8 bit alpha channel. Pixel values in the alpha channel range from 0x00 (completely transparent) to 0xFF (completely opaque). See the documentation for the LAnnotation::SetOptions function for more details on using the new style annotation toolbar.

See Also

Functions:

LAnnToolBar::FreeToolBarButtons, LAnnToolBar::GetToolBarButtons, LAnnToolBar::SetToolBarButtons