L_VecCopyToClipboard

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecCopyToClipboard(hWnd, pVector, dwFlags)

Copies vector data from the specified vector handle to the clipboard.

Parameters

L_VECTOR_WND hWnd

Handle to the active window.

const pVECTORHANDLE pVector

Pointer to the vector handle that references the vector data to be copied.

L_UINT32 dwFlags

Flag that indicates the objects to copy. Possible values are:

Value Meaning
0 Copy all layers and objects from the source vector to the clipboard.
VECTOR_FLAGS_SELECTED_ONLY Copy only selected objects from the source vector to the clipboard.

Returns

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

Comments

This function first empties the clipboard, then copies the vector data to it.

To determine whether valid vector data is on the clipboard, call L_VecClipboardReady.

To copy vector data from the clipboard to a vector handle, call L_VecCopyFromClipboard.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example loads a vector image and copies it to the clipboard, then deletes the original image.

L_INT VecCopyToClipboardExample(HWND hWnd, L_TCHAR * pszFileName) 
{ 
   L_INT nRet; 
   VECTORHANDLE   LeadVector; /* Vector handle for the image */ 
 
   /* Load a vector image */ 
   nRet = L_VecLoadFile(pszFileName, &LeadVector, NULL, NULL ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Copy the bitmap to the clipboard */ 
   nRet = L_VecCopyToClipboard(hWnd, &LeadVector, 0L); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Delete the original vector, leaving the copy in the clipboard */ 
   nRet = L_VecFree( &LeadVector ); 
 
   return nRet; 
} 

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

LEADTOOLS Vector C API Help