How to disable DPI scaling?

Hello, I found out JUCE API automatically apply some DPI scaling

May I ask
How to turn off DPI scaling ??

I am using 4K Monitors now and want to create window size of default DPI = 1.0
on MS Windows 10 or 11

Thank you

Have you tried setting JUCE_WIN_PER_MONITOR_DPI_AWARE=0 in the preprocessor macros of Projucer?

There’s also the native Win32 function SetProcessDpiAwareness(PROCESS_DPI_UNAWARE) that you could call before the window is created (I haven’t tried it, but my guess is that it would have to be called before SetSize in the PluginEditor constructor)