如何检测在Win32应用程序的显示器的热插拔? [英] How to detect hot plugging of monitor in a win32 application?

查看:170
本文介绍了如何检测在Win32应用程序的显示器的热插拔?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从Windows的某种事件,当有一个显示器被插入到系统。在Windows中有这样做的任何API。 BTW,它是一个C ++应用程序

I need some kind of event from Windows whenever there is a monitor that's getting plugged into system. Is there any API in Windows to do that. BTW, it is an C++ application

推荐答案

使用 RegisterDeviceNotification 注册获取 WM_DEVICECHANGE 通知。

这篇关于如何检测在Win32应用程序的显示器的热插拔?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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