LRESULT ChatDialog::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM , bool& bHandled) { if (uMsg == WM_KEYDOWN) { return ResponseDefaultKeyEvent(wParam); } return FALSE; }
LRESULT WindowImplBase::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM /*lParam*/, bool& /*bHandled*/) { if (uMsg == WM_KEYDOWN) { switch (wParam) { case VK_RETURN: case VK_ESCAPE: return ResponseDefaultKeyEvent(wParam); default: break; } } return FALSE; }
LRESULT CMediaWin::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM , bool& bHandled) { if (uMsg == WM_KEYDOWN) { switch (wParam) { case VK_RETURN: case VK_ESCAPE: return ResponseDefaultKeyEvent(wParam); default: break; } } return FALSE; }
LRESULT WindowImplBase::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM /*lParam*/, bool& bHandled) { if (uMsg == WM_KEYDOWN) { switch (wParam) { case VK_RETURN: case VK_ESCAPE: bHandled = !!ResponseDefaultKeyEvent(wParam); //修复按一次ESC导致多个窗口关闭的问题 return 0; default: break; } } return FALSE; }