AnnRestrictCursor method (ILEADRasterAnnotation)
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:
To restrict the cursor to the bounds of the container, pass 0 for left, top, right and bottom and 0 for ptX and ptY.
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.
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.
To do the above, and also restrict to the client area, set bRestrictClient to VARIANT_TRUE.
See Also