Trying to open display device handle to change brightness on Windows XP using C++

前端 未结 1 1850
清歌不尽
清歌不尽 2021-01-28 08:33

I am trying to write a C++/WinAPI code to change a monitor brightness. The code must be compatible with Windows XP so I can\'t use APIs like SetMonitorBrightness. So I thought t

相关标签:
1条回答
  • 2021-01-28 08:50

    You know that not all devices support this API, right? Your laptop probably supports it because it allows software adjustment of its screen brightness, perhaps even with function keys on the keyboard. Your other machine (the one running Windows 7) probably doesn't support it, so calling CreateHandle with \\\\.\\LCD doesn't get you anything useful. It has nothing to do with the operating system and everything to do with the hardware and/or the video drivers.

    0 讨论(0)
提交回复
热议问题