HPC.ru lite - Все форумы
Форум: Программирование для КПК
Тема: Регулирование яркости экрана

[Ответить]
mkol [16.06.2006 14:27] Регулирование яркости экрана:
Где-то когда-то обсуждалась функция (WinCE API C++) регулирования яркости подсветки дисплея на Windows Mobile. Кто-нибудь может дать конкретную ссылку или еще лучше оставить здесь пример?
mouser1 [16.06.2006 14:38] :
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
);
...
mkol [16.06.2006 15:56] :
Спапсибо за информацию, но на MSDN для этой функции требуется Windows Vista или Windows XP SP1. На WM может не пойти.
[Ответить]