1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

Set the window non-topmost so it can be in the background

This commit is contained in:
Toni Spets 2010-11-08 18:28:38 +02:00
parent 4849f3de54
commit 85f77578ff

2
main.c
View File

@ -336,7 +336,7 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
int y = (mode.dmPelsHeight / 2) - (This->render->height / 2);
RECT dst = { x, y, This->render->width+x, This->render->height+y };
AdjustWindowRect(&dst, GetWindowLong(This->hWnd, GWL_STYLE), FALSE);
SetWindowPos(This->hWnd, HWND_TOPMOST, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), SWP_SHOWWINDOW);
SetWindowPos(This->hWnd, HWND_NOTOPMOST, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), SWP_SHOWWINDOW);
}
else
{