CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,784

    Building a DPI aware app in VS2019

    Configuration Properties->Manifest Flle->DPI Awareness can be set to 3 x different values. Let's forget the Per Monitor setting for the moment 'cos that one's a bit complicated. So basically, the other two amount to DPI Aware and DPI Unaware.

    I read the various documents over on MSDN and my understanding is that when a user changes his desktop resolution, an app that's not DPI aware will grow bigger or smaller as appropriate - whereas a DPI aware app will rescale itself (presumably to carry on looking the same size).

    So I built a very simple app and compiled 2 versions - one with awareness enabled and one with it not enabled. But if I run both apps simultaneously and then change my desktop resolution, both apps behave absolutely identically. Does anyone know what that config setting is supposed to achieve? It doesn't seem to do what I thought it'd do...
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,784

    Re: Building a DPI aware app in VS2019

    An idea occurred to me... the above article mentions multiple monitors. So maybe if a user has monitors with different DPI settings, a DPI aware app will try to launch at the same size, regardless of which monitor it gets launched on? If that's not the reason, I can't see what it could do that'd be useful.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,784

    Re: Building a DPI aware app in VS2019

    After a bit more experimenting and measuring this morning, I realised that my old 4x3 monitor had a setting of 100 DPI whereas my super duper 4K monitor is only slightly higher (because it's a physically bigger monitor).

    So whatever this Hi-DPI stuff is intended for, my guess is that it's only applicable to hi res devices which are physically small (i.e. laptop screens). Oh well....
    "A problem well stated is a problem half solved. - Charles F. Kettering

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured