Copies vector data from the specified vector handle to the clipboard.
#include "ltvkrn.h"
L_LVKRN_API L_INT L_VecCopyToClipboard(hWnd, pVector, dwFlags)
Handle to the active window.
Pointer to the vector handle that references the vector data to be copied.
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. |
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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.
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;}