CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Location
    New Jersey, USA
    Posts
    369

    Extended desktop programatically?

    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
    I wish I was as smart as I am confused...argh!

  2. #2
    Join Date
    Nov 2003
    Posts
    2,185
    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

  3. #3
    Join Date
    May 1999
    Location
    New Jersey, USA
    Posts
    369
    Quote Originally Posted by Tischnoetentoet
    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.
    I wish I was as smart as I am confused...argh!

  4. #4
    Join Date
    May 1999
    Location
    New Jersey, USA
    Posts
    369

    PLEASE HELP! Switch from extended to non-extended desktop programatically?

    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
    I wish I was as smart as I am confused...argh!

  5. #5
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    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/de...nitor_4zak.asp
    Last edited by Mick; August 17th, 2004 at 01:33 PM.

  6. #6
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    [merged threads]

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured