Dmitry Timoshkov : msvideo: Handle ESC key press in the MCIWND class as an alias to stop command.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 21 14:26:06 CST 2005


Module: wine
Branch: refs/heads/master
Commit: b6c4beda587072c658f75fea3cb4b1e88ce58ad4
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b6c4beda587072c658f75fea3cb4b1e88ce58ad4

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Dec 21 20:07:22 2005 +0100

msvideo: Handle ESC key press in the MCIWND class as an alias to stop command.

---

 dlls/msvideo/mciwnd.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/msvideo/mciwnd.c b/dlls/msvideo/mciwnd.c
index cf52beb..4524e5e 100644
--- a/dlls/msvideo/mciwnd.c
+++ b/dlls/msvideo/mciwnd.c
@@ -429,6 +429,21 @@ static LRESULT mci_get_devcaps(MCIWndInf
     return mci_devcaps.dwReturn;
 }
 
+static LRESULT MCIWND_KeyDown(MCIWndInfo *mwi, UINT key)
+{
+    TRACE("%p, key %04x\n", mwi->hWnd, key);
+
+    switch(key)
+    {
+    case VK_ESCAPE:
+        SendMessageW(mwi->hWnd, MCI_STOP, 0, 0);
+        return 0;
+
+    default:
+        return 0;
+    }
+}
+
 static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
 {
     MCIWndInfo *mwi;
@@ -477,6 +492,9 @@ static LRESULT WINAPI MCIWndProc(HWND hW
     case WM_COMMAND:
         return MCIWND_Command(mwi, wParam, lParam);
 
+    case WM_KEYDOWN:
+        return MCIWND_KeyDown(mwi, wParam);
+
     case WM_NCACTIVATE:
         if (mwi->uTimer)
         {




More information about the wine-cvs mailing list