L_AnnCutToClipboard

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnCutToClipboard(hObject, uFormat, fSelected, fEmpty, fCheckMenu)

Cuts the specified annotation objects to the Windows clipboard in either the native format or WMF format.

Parameters

HANNOBJECT hObject

Handle to the annotation object.

L_UINT uFormat

Format for the annotation data. Possible values are:

Value Meaning
ANNFMT_EMF Use the Windows EMF format.
ANNFMT_WMF Use the Windows WMF format.
ANNFMT_XML Use the XML text format. This is LEADs new text-based format which is upward-compatible.

L_BOOL fSelected

Flag that indicates whether to copy all selected objects, or just the specified object. Possible values are:

Value Meaning
TRUE Cut all objects that have the selected property set to TRUE. For getting and setting the selected property, use the L_AnnGetSelected and L_AnnSetSelected functions.
FALSE Cut only the specified object.

L_BOOL fEmpty

Flag that indicates whether to empty the clipboard prior to copying the annotation data to it. Possible values are:

Value Meaning
TRUE Empty the clipboard before copying data to it.
FALSE Add to the existing data on the clipboard.

L_BOOL fCheckMenu

Flag that indicates whether check the automation menu to see if ANNAUTOTEXT_MENU_CUT has been checked. Possible values are:

Value Meaning
TRUE Check the automation menu to see if ANNAUTOTEXT_MENU_CUT has been checked for the specified object. Only those objects with ANNAUTOTEXT_MENU_CUT checked will be copied.
FALSE Do not check the automation menu to see if ANNAUTOTEXT_MENU_CUT has been checked for the specified object. The copied objects are determined by fSelected only.

Returns

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

Comments

(Document and Medical) Use the WMF format only for copying for use in another application.

To retain scaling and positioning information, this function always copies the root container, along with the specified object or selected objects. Use the hObject and fSelected parameters as follows:

You can copy data from the clipboard to a container using L_AnnCopyFromClipboard.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example deletes all annotations as it copies them to the clipboard.

L_INT AnnCutToClipboardExample(HANNOBJECT hAnnObject) 
{ 
   HANNOBJECT  TopContainer; /* Root container */ 
   L_INT       nRet; 
 
   /* Get the root container */ 
   L_AnnGetTopContainer(hAnnObject, &TopContainer); 
   /* Cut all annotations to the clipboard */ 
   nRet = L_AnnCutToClipboard(TopContainer, ANNFMT_XML, FALSE, TRUE, FALSE); 
   if (nRet == SUCCESS) 
      MessageBox(NULL, TEXT("Annotations cut."), TEXT("Notice"), MB_OK); 
   else 
      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