none
Compiling for High Res Screens RRS feed

  • Question

  • I have two program projects both using MFC in Visual Studio 2010.   In many ways they are similar but they have very different histories.

    When I run them on my Microsoft Surface Pro 1  with its 125% screen magnification, they behave differently.

    In one case the 16x15 pixel tool bar buttons appear to be 16x15 pixels (and are almost unusably small);  in the other they are magnified.     The screen magnification factor seems to be taking affect on one but not on the other.

    Can anyone tell me what compiler setting is causing the difference?

    Dave

    David Webber Author of Mozart music notation software http://www.mozart.co.uk

    Wednesday, April 5, 2017 9:25 AM

All replies

  • I have two program projects both using MFC in Visual Studio 2010.   In many ways they are similar but they have very different histories.

    When I run them on my Microsoft Surface Pro 1  with its 125% screen magnification, they behave differently.

    In one case the 16x15 pixel tool bar buttons appear to be 16x15 pixels (and are almost unusably small);  in the other they are magnified.     The screen magnification factor seems to be taking affect on one but not on the other.

    Can anyone tell me what compiler setting is causing the difference?

    Read Writing DPI-Aware Desktop and Win32 Applications


    • Proposed as answer by Baron Bi Monday, April 17, 2017 7:57 AM
    Wednesday, April 5, 2017 10:19 AM
  • Be aware that Windows support for high DPI displays for desktop applications is still a work in progress. For example, the Windows common controls don't resize properly even now in Windows 10 Anniversary Update. It is supposed to be fixed in the upcoming Creators Update though. The latest information on this is here.


    This is a signature Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Wednesday, April 5, 2017 11:32 AM