L_VecConvertFromWMF

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecConvertFromWMF(hDC, pVector, hWMF)

HDC hDC;

/* handle to a device context */

pVECTORHANDLE pVector;

/* pointer to a vector handle */

HMETAFILE hWMF;

/* handle to the WMF to be converted */

Converts a Windows metafile (WMF) into a LEAD Technologies vector handle. When this function is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

hDC

Handle to the device context responsible for the conversion.

pVector

Pointer to the vector handle to be updated with the converted file.

hWMF

Handle to the WMF to be converted.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function updates information in the vector handle and copies the WMF drawing data into the LEAD bitmap.

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_VecConvertToWMF, L_VecConvertToEMF, L_VecConvertFromEMF

Example

/* This example converts a windows metafile into a DXF file */

void SaveAsDXF1( HWND hWnd, L_TCHAR *pszFileName, HMETAFILE hWMF )
{
   VECTORHANDLE   TmpVector;     /* Vector handle for initial conversion */
   HDC            hDC;

   /* Convert to LEAD vector */
   hDC = GetDC( hWnd );
   L_VecConvertFromWMF(hDC, &TmpVector, hWMF );
   ReleaseDC( hWnd, hDC );

   /* Save as DXF */
   L_VecSaveFile( pszFileName, &TmpVector, FILE_DXF, NULL );

   /* Free the vector */
   L_VecFree( &TmpVector );
}