Hi,

I'm currently programming 2D game by using DirectX ID3DXSprite interface. I have created window by using CreateWindow() function and I have message handler and a message loop up and running. So, skeleton for the rendering is ready and working, but....

If I want to do so, that user can press ALT-ENTER to switch between windowed and fullscreen mode. What I have to do? I know I should read proper messages for when the keys is pressed - okey, but then what? Set the size of window somehow (SetWindowLong()) by how? And what about DirectX? Should I stop rendering (which occurs in message loop). How to do that?

And what about if I'm rendering fullscreen and user presses ALT-TAB or "windows logo" key? How to handle situation like that?

I have tried to find tutorials, but these are very hard to find for DirectX 9.

I appreciate your answers - thanks.