ANNHANDLE

Summary

The ANNHANDLE structure used for an annotation user handle.

Syntax

typedef struct tagANNHANDLE 
{ 
   L_UINT uStructSize; 
   L_INT nID; 
   ANNPOINT aptContainer; 
   POINT ptClient; 
   L_BOOL bVisible; 
   COLORREF crPen; 
   COLORREF crFill; 
   L_INT nShape; 
   HCURSOR hCursor; 
   L_UINT uFlags; 
} ANNHANDLE, *pANNHANDLE; 

Members

uStructSize

Sizeof this structure. Use sizeof(ANNHANDLE)

nID

A unique ID associated with the user handle.

When adding more than one user handle to an annotation object, give each user handle a different ID. The ID is used to uniquely identify the annotation user handle in a hit test (LAnnContainer::HitTest)

aptContainer

An ANNPOINT structure that gives the location of the handle in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

Pass uFlags (ANNHANDLE_LOCATION | ANNHANDLE_CONTAINER_COORDINATES) to use this field.

ptClient

A POINT structure that gives the location of handle in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

bVisible

A flag that indicates whether the handle is visible. Possible values are:

Value Meaning
TRUE Make the handle visible.
FALSE Make the handle invisible.

Pass uFlags ANNHANDLE_VISIBLE to use this field. The default is visible.

crPen

A COLORREF value that defines the color of the pen used to draw the user handle (the outline of the handle).

Pass uFlags ANNHANDLE_PEN_COLOR to use this field. The default is black or RGB(0,0,0).

crFill

A COLORREF value that defines the color used to fill the user handle.

Pass uFlags ANNHANDLE_FILL_COLOR to use this field. The default is white or RGB(255,255,255).

nShape

A value that defines the shape of the user handle. Possible values are:

Value Meaning
ANNHANDLE_SHAPE_SQUARE The shape of the user handle is square
ANNHANDLE_SHAPE_CIRCLE The shape of the user handle is a circle
Pass uFlags ANNHANDLE_SHAPE to use this field.
ANNHANDLE_SHAPE_CROSS The shape of the user handle is a cross
ANNHANDLE_SHAPE_SQUARE_CROSS The shape of the user handle is a square with a cross in the center
ANNHANDLE_SHAPE_CIRCLE_CROSS The shape of the user handle is a circle with a cross in the center

hCursor

Handle to a cursor. This is the cursor that appears when the mouse hovers over the user handle. Set this field to zero to get the default cursor.

uFlags

Flags that identify which members of this structure to use. If the corresponding flag for a field is absent, the default value for the field is used. Possible values are:

Value Meaning
ANNHANDLE_ID [0x0001] Use nID
ANNHANDLE_LOCATION [0x0002] Use either aptContainer or ptClient
ANNHANDLE_CONTAINER_COORDINATES [0x0004] Use aptContainer. Must be used in conjunction with flag ANNHANDLE_LOCATION
ANNHANDLE_VISIBLE [0x0008] Use bVisible
ANNHANDLE_PEN_COLOR [0x0010] Use crPen
ANNHANDLE_FILL_COLOR [0x0020] Use crFill
ANNHANDLE_SHAPE [0x0040] Use nShape
ANNHANDLE_ALL [0x007f] Logical or of all the above flags

Usage

See Also

Functions

Example

For an example, refer to LAnnRTF::AddUserHandle.

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

LEADTOOLS Raster Imaging C++ Class Library Help