Developing Games on Intel Graphics
Ask us questions and get answers, tips, tweaks & techniques from product and technology experts.
443 Discussions

Programmatically enable extended monitors

sheado
Beginner
220 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
220 Views

Still have not heard anything about this yet. But still looking into it for you.
- Chuck
sheado
Beginner
220 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.
Reply