diff src/gui_w32.c @ 333:18f024844150 v7.0086

updated for version 7.0086
author vimboss
date Thu, 16 Jun 2005 21:59:56 +0000
parents 03b3684919e3
children 2d8c2622e1fa
line wrap: on
line diff
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -498,6 +498,18 @@ init_mouse_wheel(void)
 	_OnScroll(hwnd, hwndCtl, zDelta >= 0 ? SB_PAGEUP : SB_PAGEDOWN, 0);
 }
 
+/*
+ * Invoked when a setting was changed.
+ */
+    static LRESULT CALLBACK
+_OnSettingChange(UINT n)
+{
+    if (n == SPI_SETWHEELSCROLLLINES)
+	SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0,
+		&mouse_scroll_lines, 0);
+    return 0;
+}
+
 #if 0	/* disabled, a gap appears below and beside the window, and the window
 	   can be moved (in a strange way) */
 /*
@@ -686,6 +698,10 @@ init_mouse_wheel(void)
 	_OnMouseWheel(hwnd, HIWORD(wParam));
 	break;
 
+	/* Notification for change in SystemParametersInfo() */
+    case WM_SETTINGCHANGE:
+	return _OnSettingChange((UINT)wParam);
+
 #ifdef FEAT_TOOLBAR
     case WM_NOTIFY:
 	switch (((LPNMHDR) lParam)->code)