I am frequently playing games and though I have a good graphics card, it's not capable of running all games in 4K on my 4K monitor. Since I run all my games in borderless windowed mode, I first have to reduce the monitor resolution down to 1080p before starting the game, and I'm trying to automate this.
I have already created a program that is capable of doing this, but I need to hardcode in a few big strings that are some kind of identifier. The way the program operates is that it first:
- Modifies the registry key
HKCU\Control Panel\Desktop\PerMonitorSettings\<big id here>
and set a key beneath it to lock in the font size - Uses
ChangeDisplaySettingsEx
to make the resolution and positioning change to the monitor, this has the extra benefit of refreshing the monitor setting from the registry, and reacting to my registry change in point 1
Now, I have two questions but I'll concentrate on one of them here, and that question is this:
Given the device name (id?) \\.\DISPLAY1
, is there a way to set the font size of that monitor without monkeying around in that registry key? I can't find a corresponding setting in the DEVMODE or DISPLAY_DEVICE structs that I am already using, and when trying to search for it using Google I can only find ways to make my own software DPI aware, which is not what I want.
I tried using EnumDisplayDevices
, and it gives me some device id's and another registry key but I can't find anything in that structure that would let me even read the current font size.
I basically like a programmatical way to change my monitor between 4K @ 200% size and 1080p @ 100% size.