Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Windows 上,我如何知道何时添加/删除/分离/更改分辨率/等监视器(物理显示设备)?我不想轮询 EnumDisplayDevices()。
WM_SETTINGCHANGE在主窗口中收听消息。添加或删除监视器时,它会发送到所有顶级窗口。WM_DISPLAYCHANGE当分辨率改变时你会得到。
WM_SETTINGCHANGE
WM_DISPLAYCHANGE