0

I have multiple monitors connected to my main monitor, if any of the connected monitor goes off(power off state). It should be notified. I have tried with several messages like WM_DEVICECHANGE, WM_POWERBROADCAST and WM_DEVMODECHANGE. But nothing seemed to work, because WM_DEVICECHANGE notifies when the connection is removed/connected and WM_POWERBROADCAST also didn't seem to work, when my second monitor goes to power off state.

ariels
  • 545
  • 4
  • 17
  • Probably one for Meta , look at this one [What can I Ask Here](https://stackoverflow.com/help/on-topic) – asio_guy Apr 01 '21 at 07:36
  • Related/Dupe: [Is there any way to detect the monitor state in Windows (on or off)?](https://stackoverflow.com/questions/203355/) – Remy Lebeau Apr 01 '21 at 07:38
  • @RemyLebeau that link talks about using GetDevicePowerState(..), which didn't work while I tried to fetch the 2nd monitor power status. – Deepika R Krishna Apr 01 '21 at 10:50
  • @DeepikaRKrishna read it more carefully, it mentions a few things, and links to other questions that also talk about various approaches – Remy Lebeau Apr 01 '21 at 14:47

0 Answers0