Archived

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

nickm

Screen mode switching

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.

Superpig
- 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