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. Design dialog for various resolutions without switching to that resolution

Design dialog for various resolutions without switching to that resolution

Scheduled Pinned Locked Moved C / C++ / MFC
csharpcssvisual-studiodesignquestion
2 Posts 2 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
    boxmonkey
    wrote on last edited by
    #1

    I'm trying to make a dialog that fits on screen resolutions 800*600 and up. My resolution is 1600*1200. When I was originally designing my dialogs I foolishly assumed that the number Visual Studio gives in the lower right hand corner is the size of the dialog in pixels, so I designed it to be less than 700. Lo and behold, it's way too big for an 800*600 resolution. How the heck do I know what numbers to keep the size under? Thanks, Jay

    J 1 Reply Last reply
    0
    • B boxmonkey

      I'm trying to make a dialog that fits on screen resolutions 800*600 and up. My resolution is 1600*1200. When I was originally designing my dialogs I foolishly assumed that the number Visual Studio gives in the lower right hand corner is the size of the dialog in pixels, so I designed it to be less than 700. Lo and behold, it's way too big for an 800*600 resolution. How the heck do I know what numbers to keep the size under? Thanks, Jay

      J Offline
      J Offline
      Johan Rosengren
      wrote on last edited by
      #2

      Dialogs are measured in DLUs, dialog units. The size of a dialog unit is dependent on the size of the system font. The idea is that dialogs should keep their relative size no matter what system font is used. The easiest way to make sure a dialog fits at the minimum supported resolution is simple - switch your graphics card to this resolution, draw a dialog box, then use this dialog box as a maximum-size template for all the other boxes. You can find info on DLUs on MSDN, search for GetDialogBaseUnits.

      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