I'm writing an application with Directx 9. Where I start the application in full screen mode, the image fills to fullscreen and then immediately reverts into a regular window. There aren't any problems when I run the application in windowed mode from the start.

I was wondering if anyone has any ideas as to what may be causing this.

Some things to note are that I am running the debug version of directx and I am doing everything on one monitor. The fullscreen mode problem still occurs if I "Run without debugging"

Thanks,

Mike

What exactly do you mean, 'the image'. It could be a whole host of reasons.

Chris

Yay I figured it out. What was happening was that the graphics device was setup to go into fullscreen mode; after filling up the screen with the background (ie fullscreen), the window immediately switched back to a regular window with a menu at the top.

I'm still testing some of the functions, so I was doing everything in the Init() cycle. I was closing the graphics interface/device at the end of the Init() cycle. This had no effect on windowed mode, but I guess if the device is closed while in fullscreen mode and the application is still running, then the fullscreen window changes back to a regular window.

Have you made sure that your Window is actually in full screen, with borders etc removed? My guess is you are making your drawing space 3D but not the actual window.

You window should have properties that resemble the following.

hWnd = CreateWindowEx(NULL, L"WindowClass", L"Basic Window",
                          WS_EX_TOPMOST | WS_POPUP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
                          NULL, NULL, hInstance, NULL);

WS_EX_TOPMOST, making sure it is on top. Above start bar etc. WS_POPUP removes the borders etc, SCREEN WIDTH & SCREEN_HEIGHT are self explanatory. basically the resolution.

Chris

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.