AnnRestrictCursor method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnRestrictCursor (long hContainer, long left, long top, long right, long bottom, double ptX, double ptY, VARIANT_BOOL bRestrictClient);

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Restricts the mouse cursor in conjunction with annotation objects. It should be used when creating custom annotation objects.

Calling this method always restricts the mouse cursor to the annotation container. However, depending on the arguments passed, the mouse cursor can be restricted further.

This method can be used in the following ways:

image\sqrblit.gif To restrict the cursor to the bounds of the container, pass 0 for left, top, right and bottom and 0 for ptX and ptY.

image\sqrblit.gif To restrict the cursor to a box around ptX, ptY (and the container), pass left, top, right, bottom, ptX and ptY. This is used to restrict movement when dragging an annotation. The ptX and ptY parameters specify the location at which the user begins the dragging operation by pressing the mouse button. The left, top, right and bottom parameters specify the bounding box of the annotation. Calling this method when the mouse button is pressed restricts movement of the annotation so that no part of the annotation can go outside the container. In the diagram below, the red rectangle is restricted so it cannot move outside the container.

image\AnnRestrict.gif

 

image\sqrblit.gif To restrict the cursor to a box (not centered around a point), pass pass left, top, right and bottom and pass 0 for ptX and ptY.

image\sqrblit.gif To do the above, and also restrict to the client area, set bRestrictClient to VARIANT_TRUE.

See Also

Elements:

AnnAlpha property, AnnAutoSnapCursor property, AnnCalibrateRuler method, AnnFillMode property, AnnGetFillModeExt method, AnnGetOptions method, AnnGetRotateOptions method, AnnGetTextOptions method, AnnSetFillModeExt method, AnnSetOptions method, AnnSetRotateOptions method, AnnSetTextOptions method, AnnShowBorder property, AnnShowRotateHandles property, AnnShowText property, AnnTextColor property, AnnTextEdit method, LeftPreviousClip property, TopPreviousClip property, RightPreviousClip property, BottomPreviousClip property

Topics:

Annotations (Document/Medical only):Object Manipulation

 

Annotations (Document/Medical only): Creating Custom Annotations

 

Displaying and Manipulating Annotation Objects