fix: releasing device context for window, as per msdn docs

This commit is contained in:
Brian Matzon 2003-02-10 22:13:46 +00:00
parent f6aa685151
commit 3a28d769a7
1 changed files with 5 additions and 1 deletions

View File

@ -75,6 +75,11 @@ void destroyWindow(void)
if (isFullscreen)
ChangeDisplaySettings(NULL, 0);
//release dc
if (hdc != NULL) {
ReleaseDC(hwnd, hdc);
}
if (hwnd != NULL) {
// Vape the window
DestroyWindow(hwnd);
@ -163,7 +168,6 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
}
case WM_ACTIVATE:
{
switch(LOWORD(wParam)) {
case WA_ACTIVE:
case WA_CLICKACTIVE: