L_AnnCopy

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_AnnCopy(hSource, phDest)

HANNOBJECT hSource;

/* handle to the annotation object to be copied */

pHANNOBJECT phDest;

/* address of the HANNOBJECT variable to be updated */

Makes a copy of an annotation object. This function is available in the Document/Medical Toolkits.

Parameter

Description

hSource

Handle to the annotation object to be copied.

phDest

Address of the HANNOBJECT variable to be updated with the handle of the new annotation object.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes

Comments

(Document/Medical) Before calling this function, you must declare a variable of data type HANNOBJECT. Then, pass the address of the variable in the phDest parameter. This function will update the variable with the handle of the annotation object created by the copy.

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP.

See Also

Functions:

L_AnnCopyFromClipboard, L_AnnCopyToClipboard, L_AnnCutToClipboard, L_AnnClipboardReady

Topics:

Annotation Functions: Creating and Deleting Annotations

Implementing Annotations

Implementing an Automated Annotation Program

Implementing a Non-automated Annotation Program

 

Using Rulers in Annotation Objects

Example

/* This example copies an object and moves the copy so that it can be seen */
void TestAnnCopy(HANNOBJECT hContainer, HANNOBJECT hAnnObject)
{
   HANNOBJECT NewObject; /* New object created by copying */
   ANNRECT ContainerRect;/* Rectangle for positioning the new object */
   /* Copy the incoming object and insert it into the container */
   L_AnnCopy(hAnnObject, &NewObject);
   L_AnnInsert(hContainer, NewObject, FALSE);
   /* Move the new object down and to the right */
   L_AnnGetRect(hContainer, &ContainerRect, NULL);
   L_AnnMove(NewObject,
      (ContainerRect.right - ContainerRect.left) / 20,
      (ContainerRect.bottom - ContainerRect.top) / 20,
      0); 
   return;
}