Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
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 3-May-12 22:08pm
amsga570
Comments
Richard MacCutchan at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
SAKryukov at 5-May-12 22:18pm
   
Good information, a 5.
--SA
Espen Harlinn at 7-May-12 3:00am
   
Thank you, Sergey :-D
Mika Wendelius at 23-May-12 0:10am
   
That should help!
Espen Harlinn at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 4 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid