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
Asked
Active
Viewed 3,755 times
2 Answers
9
Use RegisterDeviceNotification to register for getting WM_DEVICECHANGE notification.

Kirill V. Lyadvinsky
- 97,037
- 24
- 136
- 212
-
1It depends on how "turn off" function is implemented in the monitor and in the its driver. – Kirill V. Lyadvinsky Sep 15 '14 at 11:20
-
Just turn off the monitor and check whether it is disappeared in the Device Manager. – Kirill V. Lyadvinsky Sep 17 '14 at 05:39
1
You can do it via WMI, AFAIK. I've never tried it though so I can't give much help