C++ Programming: Better Accessibility with High DPI Support and MFC 10

Introduction

For developers with huge multi-monitor setups, problems with the text displayed on the screen being too small to read is rarely a problem. For end-users that have a 13″ full-HD laptop or a 9″ net-book, the readability of text in a 9-point font during the morning commute or a business flight is a different matter, and the traditional solution has been to lower the resolution of Windows so the text becomes more readable. The problem with this solution is that the crispness of display is compromised by running Windows at a resolution not natively supported by the monitor.

Microsoft is focusing very heavily on delivering an outstanding user experience to combat the threat of Apple, and a component of this focus is alleviating problem like a fuzzy display caused by low monitor resolution. The key element in allowing users to run at the native resolution of a monitor while keeping text readable is applications providing support for high DPI text values. The default dots per inch (DPI) that Windows renders text at is 96. By launching the Display Control Panel Applet (Control Panel\Appearance and Personalization\Display) on Windows 7 (as shown in Figure 1) the text DPI can be increased.

Changing DPI on Windows 7
Figure 1. Changing DPI on Windows 7

The monitor that this screen shot was captured on is a laptop with a small maximum resolution (1280 by 800), so the only DPI offered is a 125% increase, which takes the text to 120 DPI. Higher DPI values including 150% (144 DPI) and 200% (192 DPI) can be achieved by selecting the Set custom text size (DPI) link at the bottom left of Figure 1, which brings up the dialog shown in Figure 2.

Custom DPI settings on Windows 7
Figure 2. Custom DPI settings on Windows 7

The screen captures below show the effect of the various DPI settings. Figure 3 is the Windows Start menu at the standard DPI of 96 (Figure 3), 120 DPI (Figure 4) and 144 DPI (Figure 5). Notice that despite the increases in text size, the menu remains crisp and clear as the display is still using the native resolution of the target monitor.

Windows Start Menu at 120DPI
Figure 3. Windows Start Menu at 96DPI

Windows Start Menu at 120DPI
Figure 4. Windows Start Menu at 120DPI

Windows Start Menu at 144DPI
Figure 5. Windows Start Menu at 144DPI

The trouble with high DPI settings is that a lot of applications don’t render correctly. Figure 6 shows the VLC media player Open Media dialog at 144DPI, and it is apparent that the Device Selection buttons have covered the Video Device Name label and the text of the Advanced options button is too large to fit on the button. This is a common problem for applications running at higher DPI settings. This has often resulted in users abandoning high DPI and dealing with a fuzzy screen display with lower display resolution.

Typical High DPI Problems
Figure 6. Typical High DPI Problems

More by Author

Must Read