943,712 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 1598
  • C++ RSS
Dec 22nd, 2008
0

DirectX Question - Windowed vs Fullscreen Mode

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dinomike1000 is offline Offline
16 posts
since Sep 2008
Dec 22nd, 2008
0

Re: DirectX Question - Windowed vs Fullscreen Mode

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

Chris
Reputation Points: 325
Solved Threads: 118
Master Poster
Freaky_Chris is offline Offline
702 posts
since Apr 2008
Dec 22nd, 2008
0

Re: DirectX Question - Windowed vs Fullscreen Mode

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.
Last edited by Dinomike1000; Dec 22nd, 2008 at 6:18 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dinomike1000 is offline Offline
16 posts
since Sep 2008
Dec 22nd, 2008
0

Re: DirectX Question - Windowed vs Fullscreen Mode

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.
C++ Syntax (Toggle Plain Text)
  1. hWnd = CreateWindowEx(NULL, L"WindowClass", L"Basic Window",
  2. WS_EX_TOPMOST | WS_POPUP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
  3. 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
Last edited by Freaky_Chris; Dec 22nd, 2008 at 7:02 pm.
Reputation Points: 325
Solved Threads: 118
Master Poster
Freaky_Chris is offline Offline
702 posts
since Apr 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Energy saving project, detecting windows audio output
Next Thread in C++ Forum Timeline: power series for In(x) (challenging one)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC