Added real minimize code; cleaned up code again

This commit is contained in:
pagefault
2001-05-31 20:08:37 +00:00
parent f1ed893287
commit 369fc16f7c

View File

@@ -250,10 +250,7 @@ BOOL IsMinimized = FALSE;
extern "C" void MinimizeWindow() extern "C" void MinimizeWindow()
{ {
if (AlwaysOnTop == 1) SetWindowPos(hMainWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ShowWindow(hMainWindow, SW_MINIMIZE);
MoveWindow(hMainWindow, 0, 0, 0, 0, TRUE);
InputDeAcquire();
SetActiveWindow(0);
IsMinimized = TRUE; IsMinimized = TRUE;
} }
@@ -446,14 +443,13 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
IsActivated = 1; IsActivated = 1;
if(LOWORD(wParam) != WA_INACTIVE) if(LOWORD(wParam) != WA_INACTIVE)
if(!FirstActivate) initwinvideo(); if(!FirstActivate) initwinvideo();
if(!FullScreen) if(FullScreen == 0)
if(IsMinimized == TRUE && AlwaysOnTop == 1) CheckAlwaysOnTop(); if(IsMinimized == TRUE && AlwaysOnTop == 1) CheckAlwaysOnTop();
InputAcquire(); InputAcquire();
if(FirstActivate) FirstActivate = 0; if(FirstActivate) FirstActivate = 0;
break; break;
case WM_SETFOCUS: case WM_SETFOCUS:
if(!FullScreen) if(FullScreen == 0) ShowWindow(hMainWindow, SW_SHOWNORMAL);
ShowWindow(hMainWindow, SW_SHOWNORMAL);
InputAcquire(); InputAcquire();
break; break;
case WM_KILLFOCUS: case WM_KILLFOCUS:
@@ -1126,7 +1122,7 @@ int InitDirectDraw()
ReleaseDirectDraw(); ReleaseDirectDraw();
if(!FullScreen) if(FullScreen == 0)
{ {
GetClientRect(hMainWindow, &rcWindow ); GetClientRect(hMainWindow, &rcWindow );
ClientToScreen(hMainWindow, ( LPPOINT )&rcWindow ); ClientToScreen(hMainWindow, ( LPPOINT )&rcWindow );