Click to See Complete Forum and Search --> : PLEASE HELP! Switch from extended to non-extended desktop programatically?


gangelo
August 13th, 2004, 11:44 AM
Hi,

I have a dual monitor pc that I need to programatically switch from extended to non-extended desktop. Can someone direct me where to start?

Thank you

Tischnoetentoet
August 13th, 2004, 12:25 PM
well, isn't that just the position of the screen that's going to the other desktop??

So just add the width of the screen to the left of the dialog.

When you want to switch back, you can delete the width of the screen again!

I thought desktop doesn't use "2 different monitors"...

try this, but I can be wrong ;)

gangelo
August 13th, 2004, 02:21 PM
well, isn't that just the position of the screen that's going to the other desktop??

So just add the width of the screen to the left of the dialog.

When you want to switch back, you can delete the width of the screen again!

I thought desktop doesn't use "2 different monitors"...

try this, but I can be wrong ;)

I was talking about EXTENDING the desktop, not making an app window span across a dual monitor system.

gangelo
August 17th, 2004, 08:21 AM
:confused: Hi,

I have a dual monitor pc that I need to programatically switch from extended to non-extended desktop. Can someone direct me where to start? I am using XP Home.

Thank you

Mick
August 17th, 2004, 01:30 PM
You should poke around with ChangeDisplaySettingsEx(...). I am not sure whether the .cpl for desk adds the extend my monitor, or if it is a .cpl extension coming from the particular video/driver vendor (don't have a dual in front of me right now). But the driver should be getting a ChangeDisplaySettings(Ex) call when you modify the property page settings. You might want to confirm that by breakpointing on those API calls while running the .cpl under a debugger, and see what values it is passing...isn't much documentation on that setting in the property pages.

Here is some documentation with a slight hint about it:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/monitor_4zak.asp

Mick
August 17th, 2004, 01:37 PM
[merged threads]

Please do not cross post, bump your original post if you need to, but do not get carried away with that either :)