什么是通知的监测变化的时候,多少? [英] What is the notification when the number of monitors changes?

查看:363
本文介绍了什么是通知的监测变化的时候,多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇,什么是广播Win32的通知时监测系统中的变化是多少?我认为这是<一个href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/dd145210(v=vs.85).aspx\">WM_DISPLAYCHANGE但我错了。

I'm curious, what is the Win32 notification that is broadcast when the number of monitors in the system changes? I thought it was WM_DISPLAYCHANGE but I was wrong.

推荐答案

这是很容易检查与微软间谍++ 。在我来说,我的Windows 7 64位检查与连接两台显示器和关闭再打开第二个显示器。

This is quite easy to check with Microsoft Spy++. In my case I checked on Windows 7 x64 with two monitors connected and switching the second monitor off and on again.

在拆卸显示器,你会看到一个 WM_DISPLAYCHANGE ,增加了显示器,但不能当。

When removing a monitor you will see a WM_DISPLAYCHANGE, but not when adding a monitor.

您将看到一个 WM_DEVICECHANGE DBT_DEVNODES_CHANGED (在<一个href=\"https://msdn.microsoft.com/en-us/library/aa363431(v=vs.85).aspx\">RegisterDeviceNotification).

You will see a WM_DEVICECHANGE with DBT_DEVNODES_CHANGED (after RegisterDeviceNotification).

您将看到 WM_SETTINGCHANGE SPI_SETWORKAREA SPI_ICONVERTICALSPACING

你会看到注册信息UxdDisplayChangeMes​​sage和HotplugDetected(第二个只添加显示器时)。您可以使用<一个href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/ms644947(v=vs.85).aspx\">RegisterWindowMessage拿到标识为这些消息。

And you will see registered messages "UxdDisplayChangeMessage" and "HotplugDetected" (second one only when adding monitor). You can use RegisterWindowMessage to get the identifier for these messages.

这篇关于什么是通知的监测变化的时候,多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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