L_AnnClipboardReady

Summary

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

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnClipboardReady(pfReady)

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 a complete sample code, refer to the \Examples\Annotation\C\Annotate demo.
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(L_HWND hWnd, HANNOBJECT hContainer /* Container annotation object */) 
{ 
   L_INT       nRet; 
   L_BOOL      GoodData; /* TRUE if there is annotation data on the clipboard */ 
   L_HDC       hdc; 
   L_RECT      rAnnBounds; 
   L_RECT      rcAnnNameBounds; 
   HANNOBJECT  TmpContainer; 
 
   /* See if we have annotations on the clipboard */ 
   nRet = L_AnnClipboardReady(&GoodData); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   /* If no annotations on the clipboard, return */ 
   if (!GoodData) 
      return SUCCESS; 
 
   /* Copy the annotations */ 
   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, L_TRUE); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   hdc = GetDC(hWnd); 
   nRet = L_AnnGetBoundingRect(hContainer, &rAnnBounds, &rcAnnNameBounds); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   return L_AnnDraw(hdc, &rAnnBounds, hContainer); 
} 

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

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.