Add a dedicated debug channel for message boxes

Mike Hearn mike at navi.cx
Wed Jun 16 18:40:42 CDT 2004


It is often useful to be able to see the exact point at which a message box
was triggered, without having to enable the relay channel. With this you
can see all MessageBox calls in a dedicated channel.

Mike Hearn <mike at navi.cx>
Add a dedicated debug channel for message boxes which outputs the contents of the message

Index: windows/msgbox.c
===================================================================
RCS file: /home/wine/wine/windows/msgbox.c,v
retrieving revision 1.47
diff -u -p -r1.47 msgbox.c
--- windows/msgbox.c	1 Apr 2004 04:57:12 -0000	1.47
+++ windows/msgbox.c	16 Jun 2004 23:39:23 -0000
@@ -33,6 +33,7 @@
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dialog);
+WINE_DECLARE_DEBUG_CHANNEL(msgbox);
 
 #define MSGBOX_IDICON 1088
 #define MSGBOX_IDTEXT 100
@@ -82,6 +83,8 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LP
        if (!LoadStringW(lpmb->hInstance, LOWORD(lpmb->lpszText), buf, 256))
 	  *buf = 0;	/* FIXME ?? */
     }
+    
+    TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
     SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText);
 
     /* Hide not selected buttons */



More information about the wine-patches mailing list