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. Create Device Context with arbitrary resolution?

Create Device Context with arbitrary resolution?

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelpquestion
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.
  • B Offline
    B Offline
    Bill Lear
    wrote on last edited by
    #1

    Is it possible to create a memory device context with specific resolution and pixel depth (LOGPIXELSX, LOGPIXELSY, BITSPIXEL, et), rather than simply copying the values for an existing device? I need to play windows meta files into a DC in order to generate bitmaps which will be saved as various raster file formats. The x and y resolution as well as the pixel depth of these files are not related to the resolution of the display or to any attached printer. I am currently doing this by specifying ANISOTROPIC mapping mode, and setting the Window and Viewport Extents as required. This works for some of the metafiles, but unfortunately, many of them explicitly set the mapping mode or extents internally. I have used EnumMetaFile to trap these commands, but it would be much easier (and faster) if I could simply create a device context with the correct parameters and just play the metafile. Any help or tips would be greatly appreciated. Thanks, Bill

    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