   Alt + Enter Switching
  Hi, what can I do to stop the ugly system beep which Windows does when the user press a combination of alt + something in a window created with the Win32 API? Nestopia dont emits this beep, I read the source code of it, but I am not sure of how it did this...Thanks![Edited by - LeJa on May 4, 2010 7:41:28 PM]
  Hi guys, I finally made it work. The secret is to test the key combination before the calls to the TranslateMessage and DispatchMessage functions. And when you want to accept the key combination, you replace the current message with the next message from the queue by using PeekMessage. Example:    if (msg.message == WM_SYSKEYDOWN) {if (msg.wParam == VK_RETURN && GetAsyncKeyState(VK_MENU)) {    SwitchMode()    PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE);};    };    TranslateMessage(&msg);    DispatchMessage(&msg);Thanks!   ;  You should add this to your Window Procedure:case WM_SYSCOMMAND:{    if((wParam & ~0xF) == SC_KEYMENU)    {   // Disable Beep on Alt+[Key]   return 0;    }    return DefWindowProc(m_hWnd, uMessage, wParam, lParam);    break;};  Hi Pablo24, my snippet looked like a big hack if compared to your code! Thanks!   