“XP Style DPI Scaling”

There’s an interesting little checkbox buried deep in the DPI scaling settings in Vista labeled “Use Windows XP style DPI Scaling”. From what I’ve read about the new desktop composer in Vista – un-checking this effectively turns on full DPI scaling for applications that don’t use newer resolution independent frameworks, and haven’t marked their apps as DPI scaling aware. Vista’s support for high resolution displays represent some interesting challenges for application developers who use older developer tools such as the MFC and Windows Forms. This checkbox option makes for a really useful little option for developers who need to check to make sure their apps are working well with the Vista Desktop.

Checking the option causes non-DPI scaling aware applications to be scaled similar to the way they would have been in XP – the application is told the default system font sizes and icon sizes are larger than the typical size you would find in 96 DPI. If the application is well designed, this won’t have much of an effect on the UI, graphics and text will simply be larger on high-DPI displays, which for the most part will look the same as they would on lower DPI displays. Older frameworks will either resizing icons and bitmaps, or simply leave them the same size, making them appear smaller. In a lot of apps, this can cause funny anomalies in compact user interfaces, where text labels and other elements might slightly overlap other UI elements in the same window because the developer never anticipated a system font size larger than the typical dimensions found on 96 DPI desktops. Icon’s and bitmaps may look blurry because they weren’t designed to be scaled to these levels.

Un-checking this option will turn on full scaling of all non-DPI aware applications which acts as a compatability mode for non resolution independent apps. The effect is similar to resizing an image in a photo editing program or the scaling of textures in 3D games – fonts will be slightly blurry due to scaling effects of the composer. At really high DPI settings, fonts will become unreadable. The composer is literally resizing the application UI by rendering it’s interface to a off-screen surface and then resizing that surface before sending it to the screen.

A lot of 3rd party apps aren’t high DPI aware, so you’ll get this blurring effect in these apps with the checkbox unselected. You’re only going to see this on desktops where the user has a large cinema display and they’ve adjusted their DPI to a custom level. At 96 DPI on a typical monitor, either setting will look the same. In my case though, I’ve scaled to a custom level – 108 DPI which just happens to be where I like it. I can fit more on my desktop and better leverage my display without having to squint at the screen. It’s a very personal setting which has a lot to do with how good your eye sight is and how far away from your monitor you sit.

By default “XP Style” scaling is enabled for any display setting up to 120 DPI. Beyond that, Vista will default to “Vista Style” scaling. Overall – Win Forms developers are going to need to start paying attention to high DPI UI issues to better handle large screens, myself included. (Windows Presentation foundation apps are resolution independent, so WPF developers have nothing to worry about.) Daisy for example, which is a Win Forms application was not DPI aware. The first time I launched it on Vista with XP style scaling, I had a couple of properties dialogs that had some overlap in the UI. With Vista style scaling the blurrier UI text was annoying.

User’s in general should stick with “XP Style” scaling. If you come across an application that isn’t well designed for larger DPI’s make sure and let the developer know. Even if they don’t have a high resolution monitor, Vista will allow them to scale up the DPI settings to test for anomalies.

Side note – old school MFC hackers need to use a dependency manifest when marking their apps as DPI aware. Calling SetProcessDPIAware in init instance is too late – the MFC library will have already collected up a bunch of system metrics information by then.

Update – Rob Relyea adds in the comments that WPF developers have a few issues to deal with when using raster based graphics in their WPF apps.

11 thoughts on ““XP Style DPI Scaling”

  1. So for non-DPI scaling aware programs, it’s a choice between a broken UI with XP style scaling, or blurred fonts with Vista style scaling. If only there was a third option just to disable scaling for these particular programs. One program I’m talking about is Vodafone Mobile Connect Lite that comes with usb mobile broadband modems. Vista style scaling is the best option for this program, but there is the strange problem that the menu bar is no longer clickable.

  2. DPI is NOT a “very personal setting” and has absolutely nothing to do with “how good your eye sight is and how far away from your monitor you sit.” DPI is a PHYSICAL CHARACTERISTIC of a monitor. It should NEVER be changed by an end-user, unless for some reason it is not auto-detected properly. The idiots at Microsoft screwed up again by defaulting to 96 DPI for all these years, and all of the idiot Windows developers that don’t know how to code properly gave us crappy apps that do not scale well to high-res displays.

    DPI should only ever affect how crisp and clear the display is, NOT how large the fonts are. You should never have to squint with a high-res display, you mearly have more room to work with. Ideally, users should not even be allowed to change the DPI setting at all. Developers need to be able to rely on having an accurate DPI setting reported by the OS for a particular display.

    The correct solution if you can’t read the screen, is to set your fonts larger. It would be nice if Windows had a single “UI scale” setting, independent of DPI, which would allow you to increase all font and UI sizes uniformly at the same time, instead of having to change each one individually. This is the solution.

    I hope Windows 7 will finally use the DPI values reported by the monitor by default.

  3. Just installed Adobe Reader 9.1 for Vista(!), which definately does not incorporate this setting. I find it hard to believe that Adobe differentiates the Vista and XP builds. Most likely the binaries are identical :(

  4. Forget Adobe…Microsoft doesn’t even have all of IT’S applications DPI aware.

    Change the DPI settings higher than the default and then try to view some of the tabs in the options dialog for Windows Media Player 10…text and controls are not visible (shifted off the visible form), etc.

    The problem isn’t limited to Microsoft though…I connected a friend’s Mac Mini to my TV last year…the resolution was fine for watching videos, etc. but I couldn’t find a way to globally increase the font size…you had to do it for each individual application and the setting wasn’t always saved.

    …and don’t EVEN get me started on why very few monitors are made without a high-gloss, highly reflective screen.

  5. At really high DPI settings, fonts will become unreadable. The composer is literally resizing the application UI by rendering it’s interface to a off-screen surface and then resizing that surface before sending it to the screen.

  6. I kinda like 150% or 144 DPI, because with any other setting Icons look weird, but if the default taskbar icon size is 32 px and I go 150% these icons become 48 px, and 48x is an icon size that I know is there, Windows graphics look so much nicer this way, the problem remains with non DPI aware apps though, they look terrible, like an inflated picture.

Leave a Reply

Your email address will not be published. Required fields are marked *