How to get the screen auto-rotate\'s status (disable or enable) by Regetry or ACPI in windows8?
I need to disable screen auto-rotate, and I will use winkey + O to c
Below maybe helpful if you want to change auto-rotate status:
//C++
typedef BOOL (WINAPI* SETAUTOROTATION)(BOOL bEnable);
SETAUTOROTATION SetAutoRotation = (SETAUTOROTATION)GetProcAddress(GetModuleHandle(TEXT("user32.dll")), (LPCSTR)2507);
if(SetAutoRotation != NULL)
{
SetAutoRotation(TRUE);
}
or
//C#
[DllImport("user32.dll", EntryPoint = "#2507")]
extern static bool SetAutoRotation(bool bEnable);
SetAutoRotation(true);