   DirectX Window/Fullscreen Switching 2D
  I'm taking a class on 2D Graphics programming currently and we are using the DirectX API.  We have a screen full of sprites which we can go from windowed mode to full screen mode with no issue at all.  Our issue is that when we attempt to go back to windowed mode it still looks like it is in full screen mode.  All we do is change the Windowed function of our D3D Device from TRUE to FALSE and back again.  Any suggestions on why this works going to fullscreen but not back?-Korn   
  Define "it still looks like it's in fullscreen". Is it still in fullscreen, or in a "windowed fullscreen" mode? (i.e. a window that covers the whole screen).Can you show us the switching code?   ;  Code for switching:if (ge_Input.IsKeyDown(DIK_F)){  if( getWindowedStatus() ){    //we are currently windowed    SetWindowedStatus(false);    SetupD3D();    }}if (ge_Input.IsKeyDown(DIK_W)){ if( !getWindowedStatus() ){  //we are currently fullscreen  setWindowedStatus(true);  SetupD3D(); }}Part of code for SetupD3D()d3dpp.BackBufferFormat = getWindowedStatus() ? d3ddm.Format : D3DFMT_R5G6B5;d3dpp.BackBufferCount = 1;d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;d3dpp.hDeviceWindow = hWnd;d3dpp.Windowed = getWindowedStatus();d3dpp.BackBufferWidth = WINDOW_WIDTH;d3dpp.BackBufferHeight = WINDOW_HEIGHT;d3dpp.AutoDepthStencilFormat = D3DFMT_D16;d3dpp.EnableAutoDepthStencil = true;d3dpp.Flags = 0; //D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; //as needed...d3dpp.FullScreen_RefreshRateInHz = getWindowedStatus() ? D3DPRESENT_RATE_DEFAULT : FULL_SCREEN_REFRESH_RATE;d3dpp.SwapEffect = LOCK_FRAME_RATE ? D3DSWAPEFFECT_COPY_VSYNC : D3DSWAPEFFECT_FLIP;if (getWindowedStatus())  d3dpp.FullScreen_PresentationInterval = 0;else{ d3dpp.FullScreen_PresentationInterval = LOCK_FRAME_RATE ? D3DPRESENT_INTERVAL_ONE : //if lockedD3DPRESENT_INTERVAL_IMMEDIATE; //if non-locked}Basically the windowed mode is still taking up the entire screen.  Can't see the title bar or anything it just sits like it is in fullscreen mode.  The only difference is that the mouse cursor changes back to windowed mode.   ;Quote:Original post by CornyKorn21Basically the windowed mode is still taking up the entire screen.  Can't see the title bar or anything it just sits like it is in fullscreen mode.  The only difference is that the mouse cursor changes back to windowed mode.- Do you get any debug output?- When initially going fullscreen, do you resize the window in any way? Do you modify its style?- If you're certain you have a "fullscreen-sized" window (and not actually a fullscreen window), try using SetWindowLong to modify the window style to include WS_OVERLAPPED or similar.   