In an own small software tool, we change the orientation according to user input. It works well, with one exception. After a reboot always the landscape orientation is restored.
Here are the essential lines of code, that we use:
mode.dmDisplayOrientation = portrait ? DMDO_270 : DMDO_DEFAULT;
ChangeDisplaySettingsEx(device.DeviceName, &mode, NULL, CDS_UPDATEREGISTRY | CDS_RESET | CDS_GLOBAL, NULL);
How can I figure out, the reason for the described problem?
What I have tried:
I read MSDN documentation. Changed the main monitor (2 monitors are conected to the PC). ....