L_AnnClipboardReady

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnClipboardReady(pfReady)

Determines whether the Windows clipboard contains an annotation object that can be pasted using the L_AnnCopyFromClipboard function.

Parameters

L_BOOL * 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

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

(Document and 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

Platforms

Win32, x64.

See Also

Functions

Topics

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.

L_INT AnnClipboardReadyExample(HWND         hWnd, 
                                               HANNOBJECT   hContainer)/* Container annotation object */ 
{ 
   L_INT nRet; 
   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 */ 
   nRet = L_AnnClipboardReady(&GoodData); 
   if(nRet != SUCCESS) 
      return nRet; 
   /* Copy the annotations, if they exist */ 
   if (GoodData) 
   { 
      nRet = L_AnnCopyFromClipboard(hWnd, &TmpContainer); 
      if(nRet != SUCCESS) 
         return nRet; 
      /* The following code inserts the copied annotations and allows you to see the results.  */  
      nRet = L_AnnInsert(hContainer, TmpContainer, TRUE); 
      if(nRet != SUCCESS) 
         return nRet; 
      hdc = GetDC(hWnd); 
      nRet = L_AnnGetBoundingRect(hContainer, &rAnnBounds, &rcAnnNameBounds); 
      if(nRet != SUCCESS) 
         return nRet; 
      nRet = L_AnnDraw(hdc, &rAnnBounds, hContainer); 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
   return SUCCESS; 
} 

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

LEADTOOLS Raster Imaging C API Help