Screen mode switching

Started by
1 comment, last by nickm 22 years, 5 months ago
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
Advertisement
I think I know what the problem is...Do you have any code to deal with WM_ACTIVATEAPP messages?

Newbie to game programming?
visit

KaBooMgames
Great for Newbs, Masters welcome as well
------------------------------------KaBeeM Web
<><
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

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement