I'm developing a C# .NET 6.0 app to grab various information about the connected monitors. I can accurately get the number of pixels from WinAPI (EnumDisplayMonitors) even with scaling enabled but I cannot seem to find a way to get the actual monitor scale (as set in Windows System>display (The 100%/125%/150% setting.).
If I call the WinAPI call GetDpiForMonitor I get three different DPIs but nothing that corresponds to the 125%/150% I have set on my monitors. I have looked at the different values coming out of EnumDisplayMonitors and come sometimes see different sizes for dmPelsWidth but this doesn't seem to scale with the scale setting...
Any ideas - I've been playing with this on and off for a week and googled a lot. Figure there must be a simple way to get the 100%/125%/150% value from windows but all the answers I turn up give DPI values that do not seem to correlate to the setting (as set above).
Thanks.