views:

51

answers:

1

On Windows, how can I find out when monitors (physical display devices) are added/removed/detached/resolution changed/etc.? I'd prefer not to poll EnumDisplayDevices().

+1  A: 

Listen for the WM_SETTINGCHANGE message in your main window. It is sent to all top-level windows when a monitor is added or removed. You'll get WM_DISPLAYCHANGE when the resolution is changed.

Hans Passant