DPI scaling not taking place in plugins on Windows

#1

Hi all,

I’m having no luck getting my plugin’s GUI DPI aware on Windows. When I create a standalone WIndows application, the correct DPI scaling is applied by Juce automatically and my app displays fine. However, the same GUI classes will not apply any scaling on the same monitor when ran from inside the plugin. Checking with juce::DIsplays, the display.scale is just set to 1.0, while display.dpi is set to the proper 240.0.

Could this be because the host app (Premiere in this case) flags itself as DPI-aware (have to check if this is actually the case), and we’re being taken along for a ride under those settings?

On OSX this problem doesn’t occur and the plugin’s GUI is scaled properly.

I’ve read that I could apply a transform to my windows to have scaling that way, but if it can be fixed in a more structural way that would be better of course.

0 Likes

#2

Sounds like the same issue than Errors with DPI scaling in Windows 7 and Windows plug-in scaling

0 Likes

#3

Thanks for the links! The 2nd one mentions it potentially can be solve by using Juce 5.3.2, but that is exactly the version I’m using :confused: In my case I don’t do anything resizable (all my dialogs are static), but it’s the actual scale of the dialogs, fonts, etc. that is ‘wrong’. I.e.: nothing gets scaled at higher DPI settings, and on 225% DPI I end up with a perfectly formatted and functioning but teeny dialog.

I’ve had the same effect once writing a COM plugin for Office on Windows when I was not prepared for it. Office marks its process as DPI aware to the OS, and since this setting is transient to loaded DLLs, my plugin also got a tiny interface. But there was a Windows API I could call from within my DLL telling Windows I had my own thoughts about DPI scaling, and that solved it (sorry, forgot which one). Maybe this is related here?

0 Likes