Hi:
Does WxW have any built-in event hooks for receiving video device/hardware events?
More specifically, I'd like to have a callback method for when the number of displays has changed.
I can do it manually with a thread that checks the number of displays but I was trying to avoid that extra overhead.
Thanks!
Receiving System Video (Hardware) Events?
Re: Receiving System Video (Hardware) Events?
I think wxDisplayChangedEvent is also triggered when the number of displays changes. Try it out.
https://docs.wxwidgets.org/trunk/classw ... event.html
But it's only available under Windows.
https://docs.wxwidgets.org/trunk/classw ... event.html
But it's only available under Windows.
Use the source, Luke!
Re: Receiving System Video (Hardware) Events?
Thanks Mr. Max!
Re: Receiving System Video (Hardware) Events?
FWIW, in my experience it is not sent when a display is turned on/off (it is based on WM_DISPLAYCHANGE), at least when it does not affect a resolution.
EDIT
It seems that Windows itself ignores a display (connected to a desktop with two displays) being turned on/off and still behaves as if the display was still on, so perhaps it is different e.g. when a display is physically (dis)connected to/from a laptop.
EDIT
It seems that Windows itself ignores a display (connected to a desktop with two displays) being turned on/off and still behaves as if the display was still on, so perhaps it is different e.g. when a display is physically (dis)connected to/from a laptop.