The problem is they all return scaled dimensions. For example on 4k monitor with 200% Windows UI scale they all return 1920 x 1080. While I want 3840 x 2160.
I am also aware of "Properties" > "Compatibility" tab > "Override high DPI scaling behavior" which will change that behavior for particular app. But I want to know physical desktop dimensions regardless of this setting set or not by the user.
There are some methods in some game engines that do just that easily, but at some point I need to know these dimensions before I init some game engines stuff.
Apparently, "the best option here (simple and backward compatible) is to use EnumDisplaySettings with ENUM_CURRENT_SETTINGS." https://stackoverflow.com/a/41337181
I am also aware of "Properties" > "Compatibility" tab > "Override high DPI scaling behavior" which will change that behavior for particular app. But I want to know physical desktop dimensions regardless of this setting set or not by the user.