win32
asked on
Metafile converter
Is it possible to convert from .wmf to emf (Enhanced metafile) ?
Is there a simple function to do the job ?
Is there a simple function to do the job ?
ASKER
Yes I know.. but, can't you give me a sample. I am completly lost right now..
This is what I have:
pDC and a wmf file..
I do this:
HMETAFILE hwmf = GetMetaFile(sPath);
// Now I have the hwmf, and need to convert it to emf
HENHMETAFILE = HENHMETAFILE SetWinMetaFileBits(
UINT cbBuffer, // size of buffer
CONST BYTE *lpbBuffer, // metafile data buffer
HDC hdcRef, // handle to reference DC
CONST METAFILEPICT *lpmfp // size of metafile picture
);
And yes.. I have no idea where to get the parameters ??
This is what I have:
pDC and a wmf file..
I do this:
HMETAFILE hwmf = GetMetaFile(sPath);
// Now I have the hwmf, and need to convert it to emf
HENHMETAFILE = HENHMETAFILE SetWinMetaFileBits(
UINT cbBuffer, // size of buffer
CONST BYTE *lpbBuffer, // metafile data buffer
HDC hdcRef, // handle to reference DC
CONST METAFILEPICT *lpmfp // size of metafile picture
);
And yes.. I have no idea where to get the parameters ??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this is from MSDN:
------------------------
To convert a Windows-format metafile to an enhanced-format metafile, call the GetMetaFileBitsEx function to retrieve the data from the Windows-format metafile and then call the SetWinMetaFileBits function to convert this data into an enhanced-format metafile.
------------------------
hope this helps,
ZOPPO