Aldus Placeable Metafiles -> Enhanced Metafile problems.
-
Hello - I've some problems to create an Enhanced Metafile out of a Aldus Placeable Metafile. The following code works very well for Win98, but, for some reason, in WinNT all "text" output is painted upside-down and backwards. Besides, the bounding rectangles are misaligned. Does anyone have some tip? The code is the following: // Aldus Pleaceable Metafile header struct APMFILEHEADER { DWORD dwKey; WORD hmf; SHORT left; SHORT top; SHORT right; SHORT bottom; WORD inch; DWORD dwReserved; WORD checksum; BYTE data[1]; }; ... // pData is a BYTE* to a memory buffer where the // source file contents were loaded const APMFILEHEADER* pApmH = (const APMFILEHEADER*)pData; METAFILEPICT mfp; mfp.hMF = NULL; mfp.xExt = pApmH->right - pApmH->left; mfp.yExt = pApmH->bottom - pApmH->top; mfp.mm = MM_HIENGLISH; // Construct a Enhanced Metafile from the // Windows Metafile bits, usign the // Aldus Placeable metrics HENHMETAFILE hEmf = ::SetWinMetaFileBits( dwSize - offsetof(APMFILEHEADER,data), pApmH->data, NULL, &mfp ); Thanks in advance. - Thales