Use DeviceIoControl (h, IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS, NULL, 0, (DISPLAY_BRIGHTNESS *) & amp; DisplayBrightness nOutBufferSize, & amp; NOutBufferSize, NULL) query the current Screen brightness values, the value of 7 is brightness; seven [10] 60 units, and doing will get [10, 70] of the 70 units, 10 units of the intensity of brightness is 10, will set a value of 10 brightness intensity when the power options Screen lightness of the progress bar cannot reach the bottom, if there is a way to fit or what is the way to obtain Screen lightness progress bar value??
CodePudding user response:
Set/get better display brightness with these two functions, brightness value 0-100
BOOL GetMonitorBrightness (
__in HANDLE hMonitor,
__out LPDWORD pdwMinimumBrightness,
__out LPDWORD pdwCurrentBrightness,
__out LPDWORD pdwMaximumBrightness
);
BOOL SetMonitorBrightness (
__in HANDLE hMonitor,
__in DWORD dwNewBrightness
);
CodePudding user response: