Re:Changing the primary display using the Win32 API
by londons_explore on Sunday June 12, 2022 @12:55PM
(#31716008)
When you have used the display config tool in Windows 9x to XP, you see why this API is like this.
The API lets you position each monitor independently on the 'virtual desktop', and sometimes there are constraints which mean certain positions aren't possible - and the API needs to give feedback on if a position, colour depth and resolution is allowed. Then you hit 'apply' and the change takes effect.
I don't really see any better way to implement the API without leaking implementation details which might change in future windows versions.
The API lets you position each monitor independently on the 'virtual desktop', and sometimes there are constraints which mean certain positions aren't possible - and the API needs to give feedback on if a position, colour depth and resolution is allowed. Then you hit 'apply' and the change takes effect.
I don't really see any better way to implement the API without leaking implementation details which might change in future windows versions.