[Resend][Controls] Add tracing to the edit control.

Lionel Ulmer lionel.ulmer at free.fr
Sun Mar 28 11:49:54 CST 2004


Thanks to Alexandre who pointed out that a standard function to dump message
name already exists, this patch is now much shorter and cleaner.

Note that a Janitorial project would be to add the '%s' parameter to all the
Windows message TRACE functions (would help debugging :-) ).

          Lionel

Changelog:
 - add some TRACEing to the edit control

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: controls/edit.c
===================================================================
RCS file: /home/wine/wine/controls/edit.c,v
retrieving revision 1.127
diff -u -r1.127 edit.c
--- controls/edit.c	12 Feb 2004 00:35:02 -0000	1.127
+++ controls/edit.c	28 Mar 2004 17:46:30 -0000
@@ -53,6 +53,7 @@
 #include "wine/unicode.h"
 #include "controls.h"
 #include "local.h"
+#include "message.h"
 #include "user.h"
 #include "wine/debug.h"
 
@@ -422,7 +423,7 @@
 	EDITSTATE *es = (EDITSTATE *)GetWindowLongW( hwnd, 0 );
 	LRESULT result = 0;
 
-        TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, msg, wParam, lParam);
+        TRACE("hwnd=%p msg=%x (%s) wparam=%x lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam);
 	
 	if (!es && msg != WM_NCCREATE)
 		return DefWindowProcT(hwnd, msg, wParam, lParam, unicode);
@@ -2129,6 +2130,7 @@
 			     BOOL after_wrap)
 {
 	LRESULT res = EDIT_EM_PosFromChar(es, pos, after_wrap);
+	TRACE("%d - %dx%d\n", pos, (short)LOWORD(res), (short)HIWORD(res));
 	SetCaretPos((short)LOWORD(res), (short)HIWORD(res));
 }
 
@@ -4772,7 +4774,10 @@
 	case SB_LINEDOWN:
 	case SB_PAGEUP:
 	case SB_PAGEDOWN:
-		TRACE("action %d\n", action);
+		TRACE("action %d (%s)\n", action, (action == SB_LINEUP ? "SB_LINEUP" :
+						   (action == SB_LINEDOWN ? "SB_LINEDOWN" :
+						    (action == SB_PAGEUP ? "SB_PAGEUP" :
+						     "SB_PAGEDOWN"))));
 		EDIT_EM_Scroll(es, action);
 		return 0;
 	case SB_TOP:


More information about the wine-patches mailing list