Screen Monitor Detection Power Status Change in C ++

I have a windows message loop. I need to determine when the screen is activated. Is there a windows message?

detect the power state change contains the C # path, I need a C ++ way using the win32 API.

If there is no Windows message, how can I poll the power status of the screen monitor?

+3
source share
2 answers

A Windows WM_POWERBROADCAST message appears . There, the Windows API has great support for power management. For more information, see Windows Power Management on MSDN.

+4
source

Windows ( Windows 8) GUID_CONSOLE_DISPLAY_STATE GUID_MONITOR_POWER_ON

0

Source: https://habr.com/ru/post/1783151/


All Articles