Quote:Original post by fabryIf you have a window that is 800x600, then the window will be that size. The client area will be smaller (794x575), since that includes the space for the window borders, menus, etc.Quote:
That's exactly the sort of spec where I'd expect to see a difference between BitBlt and StretchBlt performance. You could also try explicitly specifying a backbuffer size for windowed mode, in case the backbuffer is being created at say 1024x768 when re-entering windowed mode, but then the window is resized to 1024x768 which will make the client area smaller than that
Great!!!!!! The second time i switch to win mode i have the backbuffer at 800x600 and the client area size of 794x575.
Why does it happen if i use the same identical style used in CreateWindow?
I'd assume this is because when the device is reset, the window style is WS_POPUP, which means the client area is 800x600. You then change the window style to WS_OVERLAPPEDWINDOW, which reduces the client area to 794x575.
I'd use GetClientRect() to get the size of the client area, and manually specify that for the backbuffer width and height in windowed mode, instead of letting D3D handle it.