Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Screen mode switching

This topic is 6090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, I am currenly making a rpg, and I wanted to build in an editor, so you can edit from the game itself. That is, you just play the game and then you press F10 and the editor window pops up. You edit some stuff, and go back to the game to test the newly created area immediately. I was having some difficulties when I tried to implement this: the problem is the screen mode switching. The game runs full screen, but I want the editor to be a standard windows window. So when I call the function to set up the editor window, like hWnd = CreateWindow(...); SetForegroundWindow(hWnd); the game doesn''t respond to input anymore (the editor window gets the focus), but on the screen nothing happens. The game just freezes and that''s it. So do I have to do some directx calls before displaying the editor window, or does anyone see something I''m missing? Thanks in advance, Nick

Share this post

Link to post
Share on other sites
Your problem - your game''s running fullscreen, right? - must be that you''re using exclusive mode. Exclusive meaning that not even Windows has got access to the screen to draw your window.

Try calling FlipToGDISurface() before activating the window.

Or, you could switch cooperative levels/shut down DirectDraw.

- saving pigs from untimely fates
- sleeps in a ham-mock at www.thebinaryrefinery.cjb.net

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!