any popup window on windows defaults to a scale of 1.0 even if a higher is expected and applied to the main window of the plugin / app. Since the idea of Juce is to abstract from physical pixels towards logical pixels the question arises:
How to get popup windows (DocumenteWindow etc.) to actually have the same hiDPI awareness as the main window?
Or in other words, what is the difference between the main window of an app and a DocumentWindow created on the fly within the same app, when it comes to getting the correct scaling on Windows?
(Since this also happens with apps, not only plugins)
Are you absolutely sure? That’s not what I see in the WindowsDemo of the DemoRunner, for example. There, all of the windows open at a scale appropriate for the display.
Ok, so i could refine it a bit more. If the app is one consistent binary, it works.
But if one part of the program is a dynamic library, built with juce, and the window is opened from within the dynamic library, the window has no longer the correct scale. Basically like a plugin which opens it’s own window.
Both the app and the dynamic library are built with the same juce and in VS2022 on Windows 11.
Checked again and can confirm, that a part of the code was DPI aware while being part of the whole juce app. Once making it a dynamically library the very same code lost DPI awareness. But only on Windows. Is that solvable?
@reuk Is there a way to fix that? The strange thing is, that it happens when the window is opened from inside a plugin or a dynamic library. Is there a reason why under this circumstance the window is not dpi-aware?
i created a demo for you to understand the problem. I attached the projucer files and source code here as zip. It consists of a project for creating a dll and a project for a little app loading the dll. The dll is supposed to open a DialogWindow.
The window opened by the dll scales fine on Mac but not on Windows. On windows it behaves always as if there was screen scale of 1.0, no matter what scaling has been set for the different screens.
Maybe i am just doing something wrong. Please advise.