检测屏幕监视器c ++中的电源状态更改 [英] Detecting screen monitor Power State change in c++

查看:342
本文介绍了检测屏幕监视器c ++中的电源状态更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows消息循环。我需要检测屏幕何时重新启动。是否有Windows消息?



检测电源状态更改包含C#方式,我需要使用C ++方式,使用win32 API。



如果没有Windows消息,我如何轮询屏幕监视电源状态?

解决方案

有一个Windows消息 WM_POWERBROADCAST 。 Windows API对电源管理有很大的支持。请参阅 Windows电源管理部分详情请见MSDN。


I have a Windows message loop. I need to detect when the screen powers back up. Is there a windows message?

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

If there isn't a Windows message, how do I poll for screen monitor power state?

解决方案

There is a Windows message WM_POWERBROADCAST. There Windows API has a lot of support for power management. See the section on Windows Power Management at MSDN for the details.

这篇关于检测屏幕监视器c ++中的电源状态更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆