diff src/w32fns.c @ 21874:c0871d40073e

(msh_mousewheel): New variable. (w32_msg_pump): Register that Emacs accepts mousewheel events. (w32_wnd_proc): Check for mousewheel events.
author Geoff Voelker <voelker@cs.washington.edu>
date Thu, 30 Apr 1998 17:19:55 +0000
parents 711a61942023
children bc4455bca454
line wrap: on
line diff
--- a/src/w32fns.c	Thu Apr 30 06:43:48 1998 +0000
+++ b/src/w32fns.c	Thu Apr 30 17:19:55 1998 +0000
@@ -176,6 +176,9 @@
 static W32Msg saved_mouse_move_msg;
 static unsigned mouse_move_timer;
 
+/* W95 mousewheel handler */
+unsigned int msh_mousewheel = 0;	
+
 #define MOUSE_BUTTON_ID	1
 #define MOUSE_MOVE_ID	2
 
@@ -3123,6 +3126,8 @@
 w32_msg_pump (deferred_msg * msg_buf)
 {
   MSG msg;
+
+  msh_mousewheel = RegisterWindowMessage (MSH_MOUSEWHEEL);
   
   while (GetMessage (&msg, NULL, 0, 0))
     {
@@ -3908,6 +3913,14 @@
       }
 
     default:
+      /* Check for messages registered at runtime. */
+      if (msg == msh_mousewheel)
+	{
+	  wmsg.dwModifiers = w32_get_modifiers ();
+	  my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+	  return 0;
+	}
+      
     dflt:
       return DefWindowProc (hwnd, msg, wParam, lParam);
     }