From 20cd8913f5d3817dfd1efd273adeb40e3af15a06 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 26 May 2018 18:04:13 +0100 Subject: [PATCH] For #556: Suppress the Windows Default Beep (ie. Ding) whenever ALT+ is pressed. --- source/Frame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Frame.cpp b/source/Frame.cpp index f2cb3e3f..c5019cc4 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -1736,6 +1736,7 @@ LRESULT CALLBACK FrameWndProc ( if ((wparam == VK_F10) || (wparam == VK_MENU)) // VK_MENU == ALT Key return 0; + break; case WM_SYSKEYUP: @@ -1748,6 +1749,9 @@ LRESULT CALLBACK FrameWndProc ( PostMessage(window,WM_KEYUP,wparam,lparam); break; + case WM_MENUCHAR: // GH#556 - Suppress the Windows Default Beep (ie. Ding) whenever ALT+ is pressed + return (MNC_CLOSE << 16) | (wparam & 0xffff); + case WM_USER_BENCHMARK: { UpdateWindow(window); ResetMachineState();