High DPI aware apps on windows

Hi,

as high DPI monitors are becoming the new standard on windows too, how do you create high DPI aware applications in windows?
I already know the following article but it is quite old and it suggests to use a PE editor…which I want to avoid.

http://blog.xojo.com/2013/11/18/writing_high-dpi_aware_windows_apps/

Is there a more effective way?

Thanks!

[quote=221069:@Davide Pagano]Hi,

as high DPI monitors are becoming the new standard on windows too, how do you create high DPI aware applications in windows?
I already know the following article but it is quite old and it suggests to use a PE editor…which I want to avoid.

Is there a more effective way?[/quote]

We really need access to the manifest in a less hacky way. You may want to put points on <https://xojo.com/issue/6297> dated 2008 !

so does that mean that to use a PE editor is the only option?

AFAIK for the moment, yes.

ok thanks, that’s absolutely pity. I’m wondering if there’re external tools to automatize a little bit the process of modifying the manifest…

Last time I looked at creating DPI aware apps on Windows, it really was a half assed solution, which is kind of surprising since Windows has supported high DPI since version 3.1 (maybe even earlier).

We don’t want to talk about Windows 2. RIP.

What do you mean by “half assed” ?

The problems are many:

  • The way HighDPI works changed in each version of Windows from Vista to 7, to 8, to 8.1 and again to 10. So if your app is going to be HighDPI aware, it needs to handle a lot of different situations.
  • The Windows API is (as somewhat typical) really wacky. I ran into a situation where a non-HighDPI aware app tries to ask the OS about the actual Dpi, and the OS lies to it - the only way to get the true DPI is to tell the OS to switch your app into HighDPI mode first.

The good news is that if you don’t make your app HighDPI aware, on Windows 10 it basically “just works” - it pixel doubles your app (as needed) so that it runs OK - pretty much what happens to a non-retina app on OS X.

[quote=221476:@Michael Diehr]
The good news is that if you don’t make your app HighDPI aware, on Windows 10 it basically “just works” - it pixel doubles your app (as needed) so that it runs OK - pretty much what happens to a non-retina app on OS X.[/quote]

Yes, and it’s how it’s working at present. The problem is that many people bought high-dpi monitors to take advantage of their high density pixels and do not like to see blurry GUIs so they complain…

The problem is to tell Windows not to scale the app by modifying the manifest, then I have tested RubberViews to fit resolutions as high as 2550x1600. The result becomes as crisp as can be.

@Michel Bujardet will RubberViews work at 4k resolution?

It works at all resolutions. That’s the point. The catch is that if Windows scales the app, RubberViews will only get what the system gives to Xojo.