Don't allow to show the window menu

This commit is contained in:
Elias Naur 2003-02-12 12:07:50 +00:00
parent a36f15cc0e
commit dcaaccc138
1 changed files with 31 additions and 31 deletions

View File

@ -148,7 +148,6 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
case SC_SCREENSAVE: case SC_SCREENSAVE:
case SC_MONITORPOWER: case SC_MONITORPOWER:
return 0L; return 0L;
break;
case SC_MINIMIZE: case SC_MINIMIZE:
isMinimized = true; isMinimized = true;
appActivate(true); appActivate(true);
@ -163,9 +162,10 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
//would shutdown the window, which the application might not want to //would shutdown the window, which the application might not want to
return 0L; return 0L;
default: default:
return 0L; // don't allow the window menu to show
}
}
break; break;
}
}
case WM_ACTIVATE: case WM_ACTIVATE:
{ {
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
@ -179,6 +179,12 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
} }
appActivate(!isMinimized); appActivate(!isMinimized);
} }
break;
case WM_QUIT:
{
environment->SetStaticBooleanField(clsDisplay, fidclose, true);
return 0L;
}
} }
// default action // default action
@ -201,15 +207,9 @@ void handleMessages()
hwnd, // handle to window hwnd, // handle to window
0, // first message 0, // first message
0, // last message 0, // last message
PM_NOREMOVE // removal options PM_REMOVE // removal options
)) { )) {
if (GetMessage (&msg, NULL, 0, 0) <= 0) {
#ifdef _DEBUG
printf("We should quit here...\n");
#endif
return;
}
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
}; };