For #556: Suppress the Windows Default Beep (ie. Ding) whenever ALT+<key> is pressed.

This commit is contained in:
tomcw 2018-05-26 18:04:13 +01:00
parent 9fff2070c4
commit 20cd8913f5

View File

@ -1736,6 +1736,7 @@ LRESULT CALLBACK FrameWndProc (
if ((wparam == VK_F10) || (wparam == VK_MENU)) // VK_MENU == ALT Key if ((wparam == VK_F10) || (wparam == VK_MENU)) // VK_MENU == ALT Key
return 0; return 0;
break; break;
case WM_SYSKEYUP: case WM_SYSKEYUP:
@ -1748,6 +1749,9 @@ LRESULT CALLBACK FrameWndProc (
PostMessage(window,WM_KEYUP,wparam,lparam); PostMessage(window,WM_KEYUP,wparam,lparam);
break; break;
case WM_MENUCHAR: // GH#556 - Suppress the Windows Default Beep (ie. Ding) whenever ALT+<key> is pressed
return (MNC_CLOSE << 16) | (wparam & 0xffff);
case WM_USER_BENCHMARK: { case WM_USER_BENCHMARK: {
UpdateWindow(window); UpdateWindow(window);
ResetMachineState(); ResetMachineState();