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. how to system dpi in code

how to system dpi in code

Scheduled Pinned Locked Moved C / C++ / MFC
delphihelptutorial
3 Posts 3 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.
  • C Offline
    C Offline
    chethu665
    wrote on last edited by
    #1

    hi all i have got a problem like i want to get the dpi which is set in the XP inside the code like 96dpi or 120 dpi like that,but i am not finding any way. if any of u know about it please tell me . :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

    _ R 2 Replies Last reply
    0
    • C chethu665

      hi all i have got a problem like i want to get the dpi which is set in the XP inside the code like 96dpi or 120 dpi like that,but i am not finding any way. if any of u know about it please tell me . :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      I think EnumDisplaySettings() can help you. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

      1 Reply Last reply
      0
      • C chethu665

        hi all i have got a problem like i want to get the dpi which is set in the XP inside the code like 96dpi or 120 dpi like that,but i am not finding any way. if any of u know about it please tell me . :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        Create a device context for the screen (GetDC(NULL)) and call GetDeviceCaps() on it, specifying the LOGPIXELSX or LOGPIXELSY codes.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        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