Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Does anyone know what kind of messages or events are sent when you connect an external display to your system?
I noticed that my program went to adjust some of the dialogs when a second display was connected and I'm trying to figure out how to supress them or make them work for me.

If you can point me to a site which explains more of these messages, that will be great too.
Posted
Comments
Richard MacCutchan 4-May-12 6:23am    
I'm not sure of the answer, but if you have a retail version of Visual Studio you can use Spy++ to track the messages.
enhzflep 4-May-12 13:23pm    
Further to what Richard said, you can get free versions of essentially the same tool.
I had the same idea moments ago and just saw his response now.
When I plug-in a second display to my laptop, the new screen becomes my primary monitor and all output is directed to it, while the laptop's panel is turned off. This may mean there are extra/missing messages.

I'm receiving:
WM_DISPLAYCHANGE
WM_DEVICECHANGE
WM_SETTINGSCHANGE

1 solution

Have a look at WM_DISPLAYCHANGE[^]

And this Driver Development Part 6: Introduction to Display Drivers[^] provides extra information that you will find useful.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-May-12 22:18pm    
Good information, a 5.
--SA
Espen Harlinn 7-May-12 3:00am    
Thank you, Sergey :-D
Wendelius 23-May-12 0:10am    
That should help!
Espen Harlinn 23-May-12 4:29am    
Thank you Mika :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900