I’m using SDL with DirectX. I’m initializing like that:
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
SDL_SetVideoMode( width, height, 32, SDL_HWSURFACE | (fullScreen?SDL_FULLSCREEN:0));
After that I initialize DirectX, and draw everything manually by DX. Now, when I change my window from Windowed to FullScreen or otherwise I use that code:
d3dpp.Windowed = !d3dpp.Windowed;
//SDL_SetVideoMode( windowWidth, windowHeight, 32, SDL_HWSURFACE | (d3dpp.Windowed?0:SDL_FULLSCREEN));
//reseting D3D device, set DX settings
I tried both SDL_WM_ToggleFullScreen or SDL_SetVideoMode. Both works the same way for me. When I change from FullScreen to Windowed I get window without frame, minimize, close buttons like I’d use SDL_NOFRAME flag which I’m not using. BUT… When I minimize window (using taskbar) and then maximize I get normal window with border and minimize/close buttons. Also, when in NOFRAME state minimize/close buttons appear when there is mouse over it (border doesn’t appear).
Other problem I get is to make window 1024x768 resolution not including border. My window is 1024x768 but it’s full window including border so client rect is smaller and my graphic doesn’t look the same like I’d like to see it. I can make just bigger window f.e. 1100x770 or something but it’s not a solution I suppose. Users got different window settings in Windows OS and window would look different on other machines.
I’m waiting for replies