Code: Select all
res.DEVMODE\dmSize=SizeOf(DEVMODE)
res\dmPelsWidth=800
res\dmPelsHeight=600
res\dmFields=#DM_PELSWIDTH|#DM_PELSHEIGHT
ChangeDisplaySettings_(@res.DEVMODE,0)
But when my PC rebooted, it was back at 800 x 600, as if 1920 x 1080 didn't get "remembered". Am I supposed to be doing something else?
[Edit] I just saw this -> https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsexa and I'm guessing that instead of passing 0 for the last param of ChangeDisplaySettings_(), that I should be specifying #CDS_UPDATEREGISTRY for it? Would that be right?