Multimon Fullscreen Toggle problem?

From: Jasper (jasperc_at_hotmail.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 14:31:25 -0000

Hi All

I have an odd problem I cant figure out. Iam working on a multimon app with
D3D9 but Iam having trouble going from multimon windowed to multimon
fullscreen. I start with a windowed D3D9 app on each monitor and then on a
keypress I toggle both devices to fullscreen. This currently only results in
the first window created going to full screen the other one fails on the
Reset saying the device is in use by another hwnd on the debug spew. Iam not
doing multihead stuff currently by the way.

Now the odd thing is if I have toggle one screen on one key, and toggle the
other on another key that works just fine, but it dosnt work if I just loop
through the windows ie:

// This only does the first window correctly
if ( KeyPressed(DIK_F4) )
{
    ToggleFullscreen1();
    ToggleFullscreen2();
}

// But this works fine
if ( KeyPressed(DIK_F4) )
    ToggleFullscreen1();

if ( KeyPressed(DIK_F5) )
    ToggleFullscreen2();

Any ideas as to what is happening? The D3D errors when the 2nd toggle fails
are:
[1716] Direct3D9: (WARN) :Hwnd 000508c0 no good: Different Hwnd (000b0822)
already set for Device
[1716] Direct3D9: (ERROR) :SetCooperativeLevel returned failure.
CreateDevice/Reset Failed
[1716] Direct3D9: (ERROR) :Reset failed and
Reset/TestCooperativeLevel/Release are the only legal APIs to be called
subsequently

Many thanks.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004