#include "lvkrn.h"
L_LVKRN_API L_INT L_VecCopyToClipboard(hWnd, pVector, dwFlags)
L_HWND hWnd; |
handle to the active window |
const pVECTORHANDLE pVector; |
pointer to the vector handle |
L_UINT32 dwFlags; |
copy flags |
Copies vector data from the specified vector handle to the clipboard.
Parameter | Description | |
hWnd | Handle to the active window. | |
pVector | Pointer to the vector handle that references the vector data to be copied. | |
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. |
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.
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Functions: |
|
Topics: |
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;
}