Call DefWindowProc when WM_KEYDOWN, WM_SYSKEYDOWN are not handled

This commit is contained in:
Anthony Miles 2019-06-20 21:49:55 +12:00
parent 9680df47c6
commit db01f729f7
2 changed files with 17 additions and 1 deletions

View File

@ -1619,6 +1619,10 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
{ {
ToggleFauxFullscreen(hWnd); ToggleFauxFullscreen(hWnd);
} }
else
{
return DefWindowProc(hWnd, msg, wParam, lParam);
}
} }
break; break;
@ -1655,6 +1659,10 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
if(g_iWireframe++ == 2) if(g_iWireframe++ == 2)
g_iWireframe = 0; g_iWireframe = 0;
} }
else
{
return DefWindowProc(hWnd, msg, wParam, lParam);
}
} }
break; break;

View File

@ -381,8 +381,12 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
{ {
SendMessage(m_hwndChild, uMsg, wParam, lParam); SendMessage(m_hwndChild, uMsg, wParam, lParam);
} }
else
{
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}; };
break; // added per PVS suggestion. break; // added per PVS suggestion.
case WM_PAINT: case WM_PAINT:
{ {
@ -514,6 +518,10 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
{ {
SendMessage(m_hwndChild, uMsg, wParam, lParam); SendMessage(m_hwndChild, uMsg, wParam, lParam);
} }
else
{
DefWindowProc(hwnd, uMsg, wParam, lParam);
}
} }
} }
} }