Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
508 Discussions

Programmatically enable extended monitors

sheado
Beginner
879 Views
Howdy,

I'm working on an MSI motherboard with Intel GMA graphics. It has 2 DVI ports and 2 internal VGA ports. I need to force output (as extended desktop) to the 2 DVI ports. I can do this with the intel graphics utility (in windows xp), but if I happen to turn the machine back on with the DVI cables unplugged, the Intel drivers switch everything back to an internal VGA port. On subsequent boots, the machine stays in VGA mode.

I've tried to fix this by developing my own windows service/startup app using ChangeDisplaySettingsEx (http://msdn.microsoft.com/en-us/library/aa923082.aspx). e.g.
[cpp]            ....
defaultMode.dmPosition.x += 1024;
defaultMode.dmFields = DM_POSITION;
ChangeDisplaySettingsEx((LPSTR)DisplayDevice.DeviceName,
&defaultMode, NULL, CDS_NORESET|CDS_UPDATEREGISTRY, NULL);

// A second call to ChangeDisplaySettings updates the monitor.
ChangeDisplaySettings(NULL, 0);
[/cpp]
....

This kinda works. It enables the extended desktop - but unfortunately it extends onto the VGA port (regardless of which DisplayDevice instance I pass into it).

Am I calling ChangeDisplaySettingsEx incorrectly?
Would it be better to develop with an Intel API instead? If so, which one?

Any suggestions would be greatly appreciated!!
Thank You,
Sheado
0 Kudos
2 Replies
Chuck_De_Sylva
Beginner
879 Views

Still have not heard anything about this yet. But still looking into it for you.
- Chuck
0 Kudos
sheado
Beginner
879 Views

Still have not heard anything about this yet. But still looking into it for you.
- Chuck

awesome.. thank you, i really appreciate it - i'm totally stuck on this one.
0 Kudos
Reply