I want to control(On/Off) the adaptive brightness like the Power Options
Enable adaptive brightness:
by API in Win 10. I guess the API is included in the Power Management Functions: https://msdn.microsoft.com/en-us/library/windows/desktop/aa373163(v=vs.85).aspx
But I cannot find the function... May someone provide me some suggestions or directions. Thanks a lot!
I found the solution by myself, and I share the way to everyone who needs!
GUID *guidScheme;
bool bResult = false;
byte enableFunction= 0x1; //Set 0x0 to disable
bResult = PowerGetActiveScheme(NULL, &guidScheme);
if (bResult != ERROR_SUCCESS){
//error message
}
// Specifies the subgroup which will contain all of the video
// settings for a single policy.
GUID guidVideoSubgroup = { 0x7516b95f, 0xf776, 0x4464, 0x8c, 0x53, 0x06, 0x16, 0x7f, 0x40, 0xcc, 0x99 };
GUID guidAdaptiveBrightness = { 0xfbd9aa66, 0x9553, 0x4097, 0xba, 0x44, 0xed, 0x6e, 0x9d, 0x65, 0xea, 0xb8 };
bResult = PowerWriteDCValueIndex(NULL, guidScheme, &guidVideoSubgroup, &guidAdaptiveBrightness, enableFunction);
if (bResult != ERROR_SUCCESS){
//error message
}