L_VecCopyToClipboard

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecCopyToClipboard(hWnd, pVector, dwFlags)

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.

Returns

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

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.

See Also

Functions:

L_VecClipboardReady, L_VecCopyFromClipboard.

Topics:

Using the Clipboard

Example

/* This example loads a vector image and copies it to the clipboard, then deletes the original image */
void CopyImage(HWND hWnd)
{
   VECTORHANDLE   LeadVector; /* Vector handle for the image */

   /* Load a vector image */
   L_VecLoadFile(TEXT("IMAGE.DXF"), &LeadVector, NULL, NULL );

   /* Copy the bitmap to the clipboard */
   L_VecCopyToClipboard(hWnd, &LeadVector, 0L);

   /* Delete the original vector, leaving the copy in the clipboard */
   L_VecFree( &LeadVector );
}