   problem changing windowed/fullscreen mode, setting window style
  Hi,I'm developing a 2d game engine with directx and cpp language. By pressing the F2 key the player can switch between fullscreen and windowed mode. I correctly use the TestCooperativeLevel and device Reset, releasing and reacquiring all textures but i have a problem when i change the window style:The code, after device reset and objects reallocation is as follow:if(this-&gt;full_screen_mode){   ::SetWindowLongPtr(this-&gt;hWnd, GWL_EXstyle, 0);   ::SetWindowLongPtr(this-&gt;hWnd, GWL_style, WS_EX_TOPMOST | WS_VISIBLE | WS_POPUP);}else{   ::SetWindowLongPtr(this-&gt;hWnd, GWL_EXstyle, 256);   ::SetWindowLongPtr(this-&gt;hWnd, GWL_style, WS_OVERLAPPEDWINDOW);}::SetWindowPos(this-&gt;hWnd, NULL, CW_USEDEFAULT, CW_USEDEFAULT, this-&gt;Get_screen_width(),this-&gt;Get_screen_height(), SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW);Starting in windowed mode i send to a text file the GWL_style and GWL_EXstyle by using getWindowLong, the value of GWL_EXstyle is 256. After switching to full screen mode i find the correct value for GWL_style but the value 8 for GWL_EXstyle in place of 0. Then, switching to windowed mode again i find the GWL_style with the correct value but the GWL_EXstyle with value 264 (=256 + 8 (00001000 binary coded)) in place of 256. Why are my settings ignored by windows? A collateral effect is that the fps in windowed mode drops from 60fps to 34fps and my window remains always on top and if i press ALT-TAB my window loose focus but the other windows remains behind itThank you for your help[Edited by - fabry on June 16, 2009 9:27:53 AM]
  Topic has been reposted in DirectX and XNA forum.   