Results 1 to 6 of 6
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display DPI - weird happenings

    I just installed a program and it "behaved" quite strangely. I found the solution here: Add images button not visible - Bugs and complaints - Uconomix Forum. When I changed the display DPI from Large (120) to Normal (96), the problem was rectified. Another (totally different) program that runs in the system tray also regained its right-click menu, which simply wouldn't appear at the Large setting. Yet a third program displayed its interface correctly - previously, command buttons overlapped.

    What does it all mean? How can monitor DPI produce such (a variety of) ill-effects? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    Alan

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display DPI - weird happenings

    Could it be something to do with the Icon size? I'm not 100% on this, but don't they come with different (optional) sizes - e.g 16x16, 24x24, 48x48 etc? If you choose a DPI setting for which there is no equivalent Icon, perhaps it doesn't want to play nicely. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display DPI - weird happenings

    That may go some way to explaining the (mis)behaviour of the tray app, but the others are just plain ol' buttons with text on them. The first app I mentioned even showed a button "greyed out" at 120, but enabled at 96. Me thinks there be <img src=/S/spook.gif border=0 alt=spook width=15 height=15> activity at play here. <img src=/S/flee.gif border=0 alt=flee width=25 height=25>

    Alan

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display DPI - weird happenings

    If the developers hard-coded dimensions, hot spots, etc., into the application, that would explain a lot of it. The DPI setting scales your resolution, so depending on the program, it can introduce all kinds of weirdness. I've found it better to increase font sizes or drop the resolution if it's necessary to enlarge things.
    -Mark

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display DPI - weird happenings

    I found this thread: How works GDI with the high DPI on Vista? - MSDN Forums, containing the following post:

    Here's the deal for high DPI.

    At a low level, the system is keeping track of windows that do and do not claim to be able to render themselves at >96 dpi. WPF (Avalon) apps fall into this camp by default, since WPF handles all the scaling itself. Win32, WinForms, and other applications can also flag themselves as being "high DPI aware." When an app is high DPI aware, their bits are displayed directly on the screen. (I don't have the API to call right in front of me; I'll post it soon.)
    --------------------------------------------------------------------------------
    Adding API info: Here's what I got from the program manager in charge of the high DPI implementation:

    The app needs to declare itself to be DPI aware by calling SetProcessDPIAware at startup time, before performing any graphics operations, retrieving system metrics, etc., and working through any app-specific issues that cause problems at high dpi.
    --------------------------------------------------------------------------------
    When an app is not high DPI aware and the desktop window manager (DWM, the composition engine) is running, the window's contents will be scaled using an algorithm out of MS Research. Instead of being a generic sampling algorithm, this one is designed for high-contrast content, like black text on white backgrounds. While I think everyone's mileage will vary based on the exact apps and personal preference, the experience is generally pretty good, IMO. (I run at 120 DPI on a semi-regular basis on my Dell XPS laptop.)

    In previous incarnations of Windows, pretty much all the DPI scaling was left to the application author. Now, at least, there's a reasonable solution for all those legacy apps and for someone who doesn't want to move to WPF or create high DPI versions for all their graphics resources.

    As for the screenshots in that blog post... Yes, things need to be a lot better than that when we ship! It's already better in current builds, and we're continuing to improve here.

    jeff

    Maybe you can explain this further to a mug like me. It all sounds like double Dutch. Maybe then Hans and Jan Karel could team up and decipher it? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Alan

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Display DPI - weird happenings

    But if Jan Karel and I team up, it'll definitely sound like Double Dutch!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •