LVectorBase::ConvertFromWMF

Summary

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.

Syntax

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertFromWMF(hdc, hWMF)

Parameters

HDC hdc

Handle to the device context responsible for the conversion.

HMETAFILE hWMF

Handle to the WMF to be converted.

Returns

Value Meaning
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

See Also

Functions

Topics

Example

L_INT LVectorBase__ConvertFromWMFExample( HWND hWnd, L_TCHAR* pszFileName, HMETAFILE hWMF ) 
{ 
   UNREFERENCED_PARAMETER(hWnd); 
 
   L_INT          nRet; 
   LVectorBase    Vector; 
   HDC            hDC; 
 
   //Convert to LEAD vector 
   hDC = GetDC( hWnd ); 
 
   nRet = Vector.ConvertFromWMF( hDC, hWMF ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   ReleaseDC( hWnd, hDC ); 
 
   //Save as DXF 
   nRet = Vector.Save( pszFileName,FILE_DXF); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.