L_AnnClipboardReady

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_AnnClipboardReady(pfReady)

L_BOOL, L_FAR * pfReady;

/* address of the variable to be updated */

Determines whether the Windows clipboard contains an annotation object that can be pasted using the L_AnnCopyFromClipboard function. This function is available in the Document/Medical Toolkits.

Parameter

Description

pfReady

Address of the variable to be updated with a value indicating whether the clipboard contains an annotation object. Possible values are:

 

Value

Meaning

 

TRUE

The clipboard contains an annotation that can be copied.

 

FALSE

The clipboard does not contain an annotation that can be copied.

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 L_BOOL. Then, pass the address of the variable in the pfReady parameter. This function will update the variable with the result of the test.

You can use L_AnnCopyToClipboard or L_AnnCutToClipboard to put valid annotation data on the clipboard. L_AnnCopyFromClipboard can be used to copy valid annotation data from the clipboard to a container.

For more information about loading and pasting automated annotations, refer to Loading and Pasting Automated Annotations.

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_AnnCopy, L_AnnCopyFromClipboard,

 

L_AnnCopyToClipboard, L_AnnCutToClipboard

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

For complete sample code, refer to the ANNOTATE example.

/* This example checks the clipboard for valid annotation data, and if valid data is present, copies and inserts the annotations, and displays the results. */

HANNOBJECT hContainer; /* Container annotation object */
void TestAnnCopyFrom(HWND hWnd)
{
   L_BOOL GoodData; /* TRUE if there is annotation data on the clipboard */
   HDC hdc;
   RECT rAnnBounds;
   RECT rcAnnNameBounds;
   HANNOBJECT TmpContainer;

   /* See if we have annotations on the clipboard */
   L_AnnClipboardReady(&GoodData);
   /* Copy the annotations, if they exist */
   if (GoodData)
   {
      L_AnnCopyFromClipboard(hWnd, &TmpContainer);
      /* The following code inserts the copied annotations and allows you to see the results.  */ 
      L_AnnInsert(hContainer, TmpContainer, TRUE);
      hdc = GetDC(hWnd);
      L_AnnGetBoundingRect(hContainer, &rAnnBounds, &rcAnnNameBounds);
      L_AnnDraw(hdc, &rAnnBounds, hContainer);
   }
   
   return;
}