Alexandre Julliard : user32: Add 16-bit translation for parameters of the WM_H/VSCROLL edit messages.

Alexandre Julliard julliard at winehq.org
Tue Dec 15 09:40:20 CST 2009


Module: wine
Branch: master
Commit: 6af1df86ce21bb895f896dd0d9ab514bd49a8cab
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6af1df86ce21bb895f896dd0d9ab514bd49a8cab

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 15 13:22:45 2009 +0100

user32: Add 16-bit translation for parameters of the WM_H/VSCROLL edit messages.

---

 dlls/user32/edit.c  |   15 +++++----------
 dlls/user32/msg16.c |    5 +++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 4b73ec7..a2ce5f1 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -51,11 +51,8 @@
 #include "windef.h"
 #include "winbase.h"
 #include "winnt.h"
-#include "wownt32.h"
 #include "win.h"
 #include "imm.h"
-#include "wine/winbase16.h"
-#include "wine/winuser16.h"
 #include "wine/unicode.h"
 #include "controls.h"
 #include "user_private.h"
@@ -3918,7 +3915,6 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
 	 *	although it's also a regular control message.
 	 */
 	case EM_GETTHUMB: /* this one is used by NT notepad */
-	case EM_GETTHUMB16:
 	{
 		LRESULT ret;
 		if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
@@ -3932,7 +3928,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
 		TRACE("EM_GETTHUMB: returning %ld\n", ret);
 		return ret;
 	}
-	case EM_LINESCROLL16:
+	case EM_LINESCROLL:
 		TRACE("EM_LINESCROLL16\n");
 		dx = pos;
 		break;
@@ -4042,7 +4038,6 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
 	 *	although it's also a regular control message.
 	 */
 	case EM_GETTHUMB: /* this one is used by NT notepad */
-	case EM_GETTHUMB16:
 	{
 		LRESULT ret;
 		if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_VSCROLL)
@@ -4056,8 +4051,8 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
 		TRACE("EM_GETTHUMB: returning %ld\n", ret);
 		return ret;
 	}
-	case EM_LINESCROLL16:
-		TRACE("EM_LINESCROLL16 %d\n", pos);
+	case EM_LINESCROLL:
+		TRACE("EM_LINESCROLL %d\n", pos);
 		dy = pos;
 		break;
 
@@ -4083,8 +4078,8 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
  */
 static LRESULT EDIT_EM_GetThumb(EDITSTATE *es)
 {
-	return MAKELONG(EDIT_WM_VScroll(es, EM_GETTHUMB16, 0),
-		EDIT_WM_HScroll(es, EM_GETTHUMB16, 0));
+	return MAKELONG(EDIT_WM_VScroll(es, EM_GETTHUMB, 0),
+                        EDIT_WM_HScroll(es, EM_GETTHUMB, 0));
 }
 
 
diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c
index 7ccf049..674b18c 100644
--- a/dlls/user32/msg16.c
+++ b/dlls/user32/msg16.c
@@ -1038,6 +1038,11 @@ static LRESULT edit_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
     case WM_NCDESTROY:
         edit_destroy_handle( hwnd );
         return wow_handlers32.edit_proc( hwnd, msg, wParam, lParam, unicode );  /* no unlock on destroy */
+    case WM_HSCROLL:
+    case WM_VSCROLL:
+        if (LOWORD(wParam) == EM_GETTHUMB16 || LOWORD(wParam) == EM_LINESCROLL16) wParam -= msg16_offset;
+        result = wow_handlers32.edit_proc( hwnd, msg, wParam, lParam, unicode );
+        break;
     default:
         result = wow_handlers32.edit_proc( hwnd, msg, wParam, lParam, unicode );
         break;




More information about the wine-cvs mailing list