user32: horizontal and vertical scrolling of selection in edit control

Henry Kroll III henry at comptune.com
Thu Mar 25 07:06:46 CDT 2010


Replaces incomplete patch with incorrect subject header, "Fix vertical
scrolling of edit control"
-------------- next part --------------
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 9898bc4..8f7288b 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -3791,24 +3791,6 @@ static LRESULT EDIT_WM_SysKeyDown(EDITSTATE *es, INT key, DWORD key_data)
 
 /*********************************************************************
  *
- *	WM_TIMER
- *
- */
-static void EDIT_WM_Timer(EDITSTATE *es)
-{
-	if (es->region_posx < 0) {
-		EDIT_MoveBackward(es, TRUE);
-	} else if (es->region_posx > 0) {
-		EDIT_MoveForward(es, TRUE);
-	}
-/*
- *	FIXME: gotta do some vertical scrolling here, like
- *		EDIT_EM_LineScroll(hwnd, 0, 1);
- */
-}
-
-/*********************************************************************
- *
  *	WM_HSCROLL
  *
  */
@@ -4054,6 +4036,22 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
 	return 0;
 }
 
+
+/*********************************************************************
+ *
+ *	WM_TIMER
+ *
+ *      Scroll as mouse selects text beyond the edges.
+ */
+static void EDIT_WM_Timer(EDITSTATE *es)
+{
+    if (es->region_posx < 0)EDIT_WM_HScroll(es,SB_PAGELEFT,0);
+    else if (es->region_posx > 0)EDIT_WM_HScroll(es,SB_PAGERIGHT,0);
+    if (es->region_posy < 0)EDIT_WM_VScroll(es,SB_LINEUP,0);
+    else if (es->region_posy > 0)EDIT_WM_VScroll(es,SB_LINEDOWN,0);
+}
+
+
 /*********************************************************************
  *
  *	EM_GETTHUMB


More information about the wine-patches mailing list