0

I am writing a kiosk application which has 6 displays hooked up to 1 PC with 2 3 headed cards. The displays are capable of only one resolution 1024x768. For whatever reason Windows 7 detects them as displays with a resolution of 1600x1200. The desktop area must be arranged is such a way that display 1 is on the left and 6 is on the right in sequential order. This is a simple solution to solve in the lab by simply using the windows display control panel to rearrange the desktop by hand. In the field after I deliver the software to drive the kiosk this will not work as windows will rearrange the desktop and resolution if say a display fails and is replaced. My software is required to programmatically arrange the desktop and resolution.

In a perfect world I'd like to be able to make a series of win32 calls that I could wrap in a function to perform:

Set the resolution of display plugged into video card 0 port 0 to 1024x768
Set the workspace position of display plugged into video card 0 port 0 to 0,0

Set the resolution of display plugged into video card 0 port 1 to 800x600
Set the workspace position of display plugged into video card 0 port 1 to 1024,0

Set the resolution of display plugged into video card 0 port 2 to 1600x1200
Set the workspace position of display plugged into video card 0 port 2 to 1824,0

Set the resolution of display plugged into video card 1 port 0 to 640x480
Set the workspace position of display plugged into video card 1 port 0 to 3424,0

Set the resolution of display plugged into video card 1 port 1 to 1024x768
Set the workspace position of display plugged into video card 1 port 1 to 4448,0

Set the resolution of display plugged into video card 1 port 2 to 1920x1080
Set the workspace position of display plugged into video card 1 port 2 to 6368,0

Then, I would be guaranteed that port 0 in video card 0 is on the left and port 2 on video card 1 is on the right

Does anyone have any idea how I could do this in C++?

EDIT 1: Updated the resolutions to be a little more clear of the nature of the problem

EDIT 2: Updated example again to include workspace portion of the problem

EDIT 3: Spelling

BenMorel
  • 31,815
  • 47
  • 169
  • 296
micheal blunning
  • 275
  • 1
  • 2
  • 10
  • possible duplicate of [Programmatically change screen resolution?](http://stackoverflow.com/questions/215412/programmatically-change-screen-resolution) – ildjarn Jun 22 '12 at 21:57
  • My problem is slightly different because I need to specify the resolution(and workspace location) of a display based on which port it is plugged into the video card. That question sets the resolution of two monitors regardless of which port they are on. – micheal blunning Jul 11 '12 at 15:58
  • do you want to set ALL monitors to the same resolution? or to the different ones you show in your example – Whyrusleeping Jul 11 '12 at 16:08
  • Different resolutions like the example. – micheal blunning Jul 11 '12 at 16:09
  • Are you sure that other question doesn't answer yours? What does `EnumDisplayDevices` return? – Mark Ransom Jul 11 '12 at 21:27
  • EnumDisplayDevices doesn't work because if for example card 0 port 1 is unplugged \\.\DISPLAY2 becomes card 0 port 2 rather than \\.DISPLAY3. – micheal blunning Jul 12 '12 at 18:10

0 Answers0