![]() ![]() Turning on DPI-awareness will trigger the use of appropriate scaling mechanisms in MFC so that fonts and images used in the user interface will be displayed with greater clarity.įor example, below is a screen shot of a ribbon-based application, running on a system using the ‘Larger’ settings (144 DPI), without the DPI-awareness flag turned on. MFC has been updated to handle all of the adjustments necessary to support the DPI-aware scenarios in the user interface elements that it draws. What these settings do is compensate for a higher resolution by making the text and other visual elements larger (using more pixels), so they do not appear too small on the screen. That value is actually controlled by the resolution used for the monitor-a higher resolution results in more dots per inch on the screen. The terminology here is a bit confusing, because these settings don’t really manipulate the dots-per-inch value. The ‘Smaller’ setting shown below corresponds to 96 DPI, while the ‘Medium’ and ‘Larger’ settings correspond to 120 and 144 DPI, respectively. The DPI of the system is set using the display settings in the Control Panel, as shown below. AUTOMAILER MFC APPLICATION WINDOWSThis means that your application is expected to handle various DPI (dots-per-inch) settings, not just the default (96 DPI), because Windows will not automatically scale the user interface elements of your application to match the selected DPI of the system. I wanted to make you aware of a subtle but meaningful change that we have made regarding MFC applications in Visual Studio 2010: all MFC applications are now marked as ‘DPI aware’ by default. Hello, I’m Pat Brenner, a developer on the Visual C++ Libraries team, mainly responsible for MFC. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |