Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Aldus Placeable Metafiles -> Enhanced Metafile problems.

Aldus Placeable Metafiles -> Enhanced Metafile problems.

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Thales P Carvalho
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups