Вопрос

Does Windows send any message if the monitors poisition changed?

e.g. I get messege if a new monitor plugged in the PC from WM_DEVICECHANGE.

I need a message like this, when I change the position of the monitors.

( On poisiton i mean: First monitor to the left, second monitor to the right. After that i change the poisiton, first monitor the the right, second monitor the the left. )

Это было полезно?

Решение

You could listen for WM_DISPLAYCHANGE message.

The documentation says that it is sent on monitor resolution change, but my experimenting with Spy++ on Win7 shows that it is sent on multiple monitors arrangement change as well (in fact, it is the only system-wide notification which is sent at that moment).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top