I had wanted to publish a new version of my app (WPF converted to UWP with Desktop Bridge) to the Microsoft Store, but it failed the certification with following warning:
- File **.exe neither has PerMonitorV2 manifested in the manifest nor calls into DPI Awareness APIs for ex: user32!SetProcessDpiAwarenessContext or user32!SetThreadDpiAwarenessContext.
- The app *** is not DPI Aware.
I have the following questions:
First of all I had published the first version of my app at the end of the last year and there was no problems with the DPI awareness. So this is a new test?
Since this is just a warning and all other tests are passed, this could be the reason why the certification process failed?
So I tried to make my app DPI aware...
Based on this description I called into SetProcessDpiAwarenessContext
function and checked with all of the four values. With unaware
and System aware
flags my app looked blurry, and with the Per Monitor
flags looked good, but when I requested the screen size, it returned the original width and height, not counting the scale (I have a 150% scale), so my windows was positioned to a wrong part of the screen. The question is that if there are just those 4 flags to set and none of them works as the default (without setting anything), then what is the default setting?
Okay, here is listed 5 flags, but none of them are working as if there would be nothing set.
Thanks a lot!