Регулирование яркости экрана
Регулирование яркости экрана
Где-то когда-то обсуждалась функция (WinCE API C++) регулирования яркости подсветки дисплея на Windows Mobile. Кто-нибудь может дать конкретную ссылку или еще лучше оставить здесь пример?
From MSDN 2006Jan:
DISPLAY_BRIGHTNESS
The DISPLAY_BRIGHTNESS structure describes the brightness of the display device. It is used by the IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS and IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS control codes.
typedef struct _DISPLAY_BRIGHTNESS { UCHAR ucDisplayPolicy; UCHAR ucACBrightness; UCHAR ucDCBrightness;
} DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
...
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
The IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS control code sets the current AC and DC backlight levels.
To perform this operation, call the DeviceIoControl function with the following parameters.
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS, // dwIoControlCode
(LPVOID) lpInBuffer, // input buffer
(DWORD) nInBufferSize, // size of the input buffer
NULL, // lpOutBuffer
0, // nOutBufferSize
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
...
DISPLAY_BRIGHTNESS
The DISPLAY_BRIGHTNESS structure describes the brightness of the display device. It is used by the IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS and IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS control codes.
typedef struct _DISPLAY_BRIGHTNESS { UCHAR ucDisplayPolicy; UCHAR ucACBrightness; UCHAR ucDCBrightness;
} DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
...
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
The IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS control code sets the current AC and DC backlight levels.
To perform this operation, call the DeviceIoControl function with the following parameters.
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS, // dwIoControlCode
(LPVOID) lpInBuffer, // input buffer
(DWORD) nInBufferSize, // size of the input buffer
NULL, // lpOutBuffer
0, // nOutBufferSize
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
...