2 * Message spying routines
4 * Copyright 1994, Bob Amstadt
8 #define NO_TRANSITION_TYPES /* This file is Win32-clean */
19 #define SPY_MAX_MSGNUM WM_USER
20 #define SPY_INDENT_UNIT 4 /* 4 spaces */
22 static const char * const MessageTypeNames
[SPY_MAX_MSGNUM
+ 1] =
40 "WM_CLOSE", /* 0x10 */
56 "WM_SETCURSOR", /* 0x20 */
72 "WM_SETFONT", /* 0x30 */
84 "wm_otherwindowcreated",
85 "wm_otherwindowdestroyed",
86 "wm_activateshellwindow",
90 "wm_compacting", NULL
, NULL
,
91 "WM_COMMNOTIFY", NULL
,
92 "WM_WINDOWPOSCHANGING", /* 0x0046 */
93 "WM_WINDOWPOSCHANGED", /* 0x0047 */
96 "WM_CANCELJOURNAL", NULL
, NULL
, NULL
, NULL
,
99 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
100 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
103 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
104 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
107 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
108 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
111 "WM_NCCREATE", /* 0x0081 */
112 "WM_NCDESTROY", /* 0x0082 */
113 "WM_NCCALCSIZE", /* 0x0083 */
114 "WM_NCHITTEST", /* 0x0084 */
115 "WM_NCPAINT", /* 0x0085 */
116 "WM_NCACTIVATE", /* 0x0086 */
117 "WM_GETDLGCODE", /* 0x0087 */
119 "wm_synctask", NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
122 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
123 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
126 "WM_NCMOUSEMOVE", /* 0x00A0 */
127 "WM_NCLBUTTONDOWN", /* 0x00A1 */
128 "WM_NCLBUTTONUP", /* 0x00A2 */
129 "WM_NCLBUTTONDBLCLK", /* 0x00A3 */
130 "WM_NCRBUTTONDOWN", /* 0x00A4 */
131 "WM_NCRBUTTONUP", /* 0x00A5 */
132 "WM_NCRBUTTONDBLCLK", /* 0x00A6 */
133 "WM_NCMBUTTONDOWN", /* 0x00A7 */
134 "WM_NCMBUTTONUP", /* 0x00A8 */
135 "WM_NCMBUTTONDBLCLK", /* 0x00A9 */
136 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
138 /* 0x00B0 - Win32 Edit controls */
139 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
140 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
143 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
144 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
147 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
148 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
150 /* 0x00E0 - Win32 Scrollbars */
151 "SBM_SETPOS32", /* 0x00e0 */
152 "SBM_GETPOS32", /* 0x00e1 */
153 "SBM_SETRANGE32", /* 0x00e2 */
154 "SBM_GETRANGE32", /* 0x00e3 */
155 "SBM_ENABLE_ARROWS32", /* 0x00e4 */
157 "SBM_SETRANGEREDRAW32", /* 0x00e6 */
159 "SBM_SETSCROLLINFO32", /* 0x00e9 */
160 "SBM_GETSCROLLINFO32", /* 0x00ea */
161 NULL
, NULL
, NULL
, NULL
, NULL
,
163 /* 0x00F0 - Win32 Buttons */
164 "BM_GETCHECK32", /* 0x00f0 */
165 "BM_SETCHECK32", /* 0x00f1 */
166 "BM_GETSTATE32", /* 0x00f2 */
167 "BM_SETSTATE32", /* 0x00f3 */
168 "BM_SETSTYLE32", /* 0x00f4 */
169 "BM_CLICK32", /* 0x00f5 */
170 "BM_GETIMAGE32", /* 0x00f6 */
171 "BM_SETIMAGE32", /* 0x00f7 */
172 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
174 "WM_KEYDOWN", /* 0x0100 */
175 "WM_KEYUP", /* 0x0101 */
176 "WM_CHAR", /* 0x0102 */
177 "WM_DEADCHAR", /* 0x0103 */
178 "WM_SYSKEYDOWN", /* 0x0104 */
179 "WM_SYSKEYUP", /* 0x0105 */
180 "WM_SYSCHAR", /* 0x0106 */
181 "WM_SYSDEADCHAR", /* 0x0107 */
182 "WM_KEYLAST", /* 0x0108 */
186 "WM_INTERIM", NULL
, NULL
, NULL
,
188 "WM_INITDIALOG", /* 0x0110 */
189 "WM_COMMAND", /* 0x0111 */
190 "WM_SYSCOMMAND", /* 0x0112 */
191 "WM_TIMER", /* 0x0113 */
192 "WM_HSCROLL", /* 0x0114 */
193 "WM_VSCROLL", /* 0x0115 */
194 "WM_INITMENU", /* 0x0116 */
195 "WM_INITMENUPOPUP", /* 0x0117 */
196 "WM_SYSTIMER", /* 0x0118 */
197 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
198 "WM_MENUSELECT", /* 0x011f */
200 "WM_MENUCHAR", /* 0x0120 */
201 "WM_ENTERIDLE", /* 0x0121 */
202 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
203 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
207 "wm_lbtrackpoint", /* 0x0131 */
208 "WM_CTLCOLORMSGBOX", /* 0x0132 */
209 "WM_CTLCOLOREDIT", /* 0x0133 */
210 "WM_CTLCOLORLISTBOX", /* 0x0134 */
211 "WM_CTLCOLORBTN", /* 0x0135 */
212 "WM_CTLCOLORDLG", /* 0x0136 */
213 "WM_CTLCOLORSCROLLBAR", /* 0x0137 */
214 "WM_CTLCOLORSTATIC", /* 0x0138 */
215 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
217 /* 0x0140 - Win32 Comboboxes */
218 "CB_GETEDITSEL32", /* 0x0140 */
219 "CB_LIMITTEXT32", /* 0x0141 */
220 "CB_SETEDITSEL32", /* 0x0142 */
221 "CB_ADDSTRING32", /* 0x0143 */
222 "CB_DELETESTRING32", /* 0x0144 */
223 "CB_DIR32", /* 0x0145 */
224 "CB_GETCOUNT32", /* 0x0146 */
225 "CB_GETCURSEL32", /* 0x0147 */
226 "CB_GETLBTEXT32", /* 0x0148 */
227 "CB_GETLBTEXTLEN32", /* 0x0149 */
228 "CB_INSERTSTRING32", /* 0x014a */
229 "CB_RESETCONTENT32", /* 0x014b */
230 "CB_FINDSTRING32", /* 0x014c */
231 "CB_SELECTSTRING32", /* 0x014d */
232 "CB_SETCURSEL32", /* 0x014e */
233 "CB_SHOWDROPDOWN32", /* 0x014f */
235 "CB_GETITEMDATA32", /* 0x0150 */
236 "CB_SETITEMDATA32", /* 0x0151 */
237 "CB_GETDROPPEDCONTROLRECT32",/* 0x0152 */
238 "CB_SETITEMHEIGHT32", /* 0x0153 */
239 "CB_GETITEMHEIGHT32", /* 0x0154 */
240 "CB_SETEXTENDEDUI32", /* 0x0155 */
241 "CB_GETEXTENDEDUI32", /* 0x0156 */
242 "CB_GETDROPPEDSTATE32", /* 0x0157 */
243 "CB_FINDSTRINGEXACT32", /* 0x0158 */
244 "CB_SETLOCALE32", /* 0x0159 */
245 "CB_GETLOCALE32", /* 0x015a */
246 "CB_GETTOPINDEX32", /* 0x015b */
247 "CB_SETTOPINDEX32", /* 0x015c */
248 "CB_GETHORIZONTALEXTENT32", /* 0x015d */
249 "CB_SETHORIZONTALEXTENT32", /* 0x015e */
250 "CB_GETDROPPEDWIDTH32", /* 0x015f */
252 "CB_SETDROPPEDWIDTH32", /* 0x0160 */
253 "CB_INITSTORAGE32", /* 0x0161 */
254 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
255 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
257 /* 0x0170 - Win32 Static controls */
258 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
259 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
261 /* 0x0180 - Win32 Listboxes */
262 "LB_ADDSTRING32", /* 0x0180 */
263 "LB_INSERTSTRING32", /* 0x0181 */
264 "LB_DELETESTRING32", /* 0x0182 */
265 "LB_SELITEMRANGEEX32", /* 0x0183 */
266 "LB_RESETCONTENT32", /* 0x0184 */
267 "LB_SETSEL32", /* 0x0185 */
268 "LB_SETCURSEL32", /* 0x0186 */
269 "LB_GETSEL32", /* 0x0187 */
270 "LB_GETCURSEL32", /* 0x0188 */
271 "LB_GETTEXT32", /* 0x0189 */
272 "LB_GETTEXTLEN32", /* 0x018a */
273 "LB_GETCOUNT32", /* 0x018b */
274 "LB_SELECTSTRING32", /* 0x018c */
275 "LB_DIR32", /* 0x018d */
276 "LB_GETTOPINDEX32", /* 0x018e */
277 "LB_FINDSTRING32", /* 0x018f */
279 "LB_GETSELCOUNT32", /* 0x0190 */
280 "LB_GETSELITEMS32", /* 0x0191 */
281 "LB_SETTABSTOPS32", /* 0x0192 */
282 "LB_GETHORIZONTALEXTENT32", /* 0x0193 */
283 "LB_SETHORIZONTALEXTENT32", /* 0x0194 */
284 "LB_SETCOLUMNWIDTH32", /* 0x0195 */
285 "LB_ADDFILE32", /* 0x0196 */
286 "LB_SETTOPINDEX32", /* 0x0197 */
287 "LB_GETITEMRECT32", /* 0x0198 */
288 "LB_GETITEMDATA32", /* 0x0199 */
289 "LB_SETITEMDATA32", /* 0x019a */
290 "LB_SELITEMRANGE32", /* 0x019b */
291 "LB_SETANCHORINDEX32", /* 0x019c */
292 "LB_GETANCHORINDEX32", /* 0x019d */
293 "LB_SETCARETINDEX32", /* 0x019e */
294 "LB_GETCARETINDEX32", /* 0x019f */
296 "LB_SETITEMHEIGHT32", /* 0x01a0 */
297 "LB_GETITEMHEIGHT32", /* 0x01a1 */
298 "LB_FINDSTRINGEXACT32", /* 0x01a2 */
300 "LB_SETLOCALE32", /* 0x01a5 */
301 "LB_GETLOCALE32", /* 0x01a6 */
302 "LB_SETCOUNT32", /* 0x01a7 */
303 "LB_INITSTORAGE32", /* 0x01a8 */
304 "LB_ITEMFROMPOINT32", /* 0x01a9 */
305 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
308 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
309 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
312 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
313 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
316 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
317 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
320 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
321 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
324 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
325 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
327 "WM_MOUSEMOVE", /* 0x0200 */
328 "WM_LBUTTONDOWN", /* 0x0201 */
329 "WM_LBUTTONUP", /* 0x0202 */
330 "WM_LBUTTONDBLCLK", /* 0x0203 */
331 "WM_RBUTTONDOWN", /* 0x0204 */
332 "WM_RBUTTONUP", /* 0x0205 */
333 "WM_RBUTTONDBLCLK", /* 0x0206 */
334 "WM_MBUTTONDOWN", /* 0x0207 */
335 "WM_MBUTTONUP", /* 0x0208 */
336 "WM_MBUTTONDBLCLK", /* 0x0209 */
337 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
339 "WM_PARENTNOTIFY", /* 0x0210 */
340 "WM_ENTERMENULOOP", /* 0x0211 */
341 "WM_EXITMENULOOP", /* 0x0212 */
342 "wm_nextmenu", /* 0x0213 */
343 NULL
, NULL
, NULL
, NULL
,
344 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
346 "WM_MDICREATE", /* 0x0220 */
347 "WM_MDIDESTROY", /* 0x0221 */
348 "WM_MDIACTIVATE", /* 0x0222 */
349 "WM_MDIRESTORE", /* 0x0223 */
350 "WM_MDINEXT", /* 0x0224 */
351 "WM_MDIMAXIMIZE", /* 0x0225 */
352 "WM_MDITILE", /* 0x0226 */
353 "WM_MDICASCADE", /* 0x0227 */
354 "WM_MDIICONARRANGE", /* 0x0228 */
355 "WM_MDIGETACTIVE", /* 0x0229 */
358 "wm_querydropobject",
365 "WM_MDISETMENU", /* 0x0230 */
366 "WM_ENTERSIZEMOVE", /* 0x0231 */
367 "WM_EXITSIZEMOVE", /* 0x0232 */
368 "WM_DROPFILES", /* 0x0233 */
369 "WM_MDIREFRESHMENU", NULL
, NULL
, NULL
,
371 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
374 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
375 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
378 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
379 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
382 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
383 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
384 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
385 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
388 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
389 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
390 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
391 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
393 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
394 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
395 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
396 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
399 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
400 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
401 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
402 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
404 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
405 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
406 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
407 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
409 "WM_CUT", /* 0x0300 */
415 "WM_RENDERALLFORMATS",
416 "WM_DESTROYCLIPBOARD",
419 "WM_VSCROLLCLIPBOARD",
421 "WM_ASKCBFORMATNAME",
423 "WM_HSCROLLCLIPBOARD",
424 "WM_QUERYNEWPALETTE", /* 0x030f*/
426 "WM_PALETTEISCHANGING",
428 "WM_HOTKEY", /* 0x0312 */
429 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
430 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
432 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
433 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
434 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
435 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
438 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
439 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
440 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
441 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
443 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
444 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
445 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
446 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
456 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
459 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
460 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
463 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
464 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
465 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
466 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
469 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
470 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
471 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
472 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
475 "WM_DDE_INITIATE", /* 0x3E0 */
476 "WM_DDE_TERMINATE", /* 0x3E1 */
477 "WM_DDE_ADVISE", /* 0x3E2 */
478 "WM_DDE_UNADVISE", /* 0x3E3 */
479 "WM_DDE_ACK", /* 0x3E4 */
480 "WM_DDE_DATA", /* 0x3E5 */
481 "WM_DDE_REQUEST", /* 0x3E6 */
482 "WM_DDE_POKE", /* 0x3E7 */
483 "WM_DDE_EXECUTE", /* 0x3E8 */
484 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
488 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
489 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
495 static BOOL16 SPY_Exclude
[SPY_MAX_MSGNUM
+1];
496 static int SPY_IndentLevel
= 0;
498 #define SPY_EXCLUDE(msg) \
499 (SPY_Exclude[(msg) > SPY_MAX_MSGNUM ? SPY_MAX_MSGNUM : (msg)])
501 /***********************************************************************
504 const char *SPY_GetMsgName( UINT32 msg
)
506 static char buffer
[20];
508 if (msg
<= SPY_MAX_MSGNUM
)
510 if (!MessageTypeNames
[msg
]) return "???";
511 return MessageTypeNames
[msg
];
513 sprintf( buffer
, "WM_USER+%04x", msg
- WM_USER
);
518 /***********************************************************************
521 void SPY_EnterMessage( INT32 iFlag
, HWND32 hWnd
, UINT32 msg
,
522 WPARAM32 wParam
, LPARAM lParam
)
524 if (!debugging_message
|| SPY_EXCLUDE(msg
)) return;
526 /* each SPY_SENDMESSAGE must be complemented by call to SPY_ExitMessage */
529 case SPY_DISPATCHMESSAGE16
:
530 dprintf_message(stddeb
,"%*s(%04x) message [%04x] %s dispatched wp=%04x lp=%08lx\n",
531 SPY_IndentLevel
, "", hWnd
, msg
, SPY_GetMsgName( msg
),
535 case SPY_DISPATCHMESSAGE32
:
536 dprintf_message(stddeb
,"%*s(%08x) message [%04x] %s dispatched wp=%08x lp=%08lx\n",
537 SPY_IndentLevel
, "", hWnd
, msg
, SPY_GetMsgName( msg
),
541 case SPY_SENDMESSAGE16
:
542 case SPY_SENDMESSAGE32
:
545 HTASK16 hTask
= GetWindowTask16(hWnd
);
546 if (hTask
== GetCurrentTask()) strcpy( taskName
, "self" );
547 else if (!hTask
) strcpy( taskName
, "Wine" );
548 else sprintf( taskName
, "task %04x %s",
549 hTask
, MODULE_GetModuleName( GetExePtr(hTask
) ) );
551 if (iFlag
== SPY_SENDMESSAGE16
)
552 dprintf_message(stddeb
,"%*s(%04x) message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
553 SPY_IndentLevel
, "", hWnd
, msg
,
554 SPY_GetMsgName( msg
), taskName
, wParam
,
557 dprintf_message(stddeb
,"%*s(%08x) message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
558 SPY_IndentLevel
, "", hWnd
, msg
,
559 SPY_GetMsgName( msg
), taskName
, wParam
,
564 case SPY_DEFWNDPROC16
:
565 dprintf_message(stddeb
, "%*s(%04x) DefWindowProc: %s [%04x] wp=%04x lp=%08lx\n",
566 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
),
567 msg
, wParam
, lParam
);
570 case SPY_DEFWNDPROC32
:
571 dprintf_message(stddeb
, "%*s(%08x) DefWindowProc: %s [%04x] wp=%08x lp=%08lx\n",
572 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
),
573 msg
, wParam
, lParam
);
576 SPY_IndentLevel
+= SPY_INDENT_UNIT
;
580 /***********************************************************************
583 void SPY_ExitMessage( INT32 iFlag
, HWND32 hWnd
, UINT32 msg
, LRESULT lReturn
)
585 if (!debugging_message
|| SPY_EXCLUDE(msg
)) return;
586 if (SPY_IndentLevel
) SPY_IndentLevel
-= SPY_INDENT_UNIT
;
590 case SPY_RESULT_OK16
:
591 dprintf_message(stddeb
,"%*s(%04x) message [%04x] %s returned %08lx\n",
592 SPY_IndentLevel
, "", hWnd
, msg
,
593 SPY_GetMsgName( msg
), lReturn
);
595 case SPY_RESULT_OK32
:
596 dprintf_message(stddeb
,"%*s(%08x) message [%04x] %s returned %08lx\n",
597 SPY_IndentLevel
, "", hWnd
, msg
,
598 SPY_GetMsgName( msg
), lReturn
);
600 case SPY_RESULT_INVALIDHWND16
:
601 dprintf_message(stddeb
,"%*s(%04x) message [%04x] %s HAS INVALID HWND\n",
602 SPY_IndentLevel
, "", hWnd
, msg
,
603 SPY_GetMsgName( msg
) );
605 case SPY_RESULT_INVALIDHWND32
:
606 dprintf_message(stddeb
,"%*s(%08x) message [%04x] %s HAS INVALID HWND\n",
607 SPY_IndentLevel
, "", hWnd
, msg
,
608 SPY_GetMsgName( msg
) );
614 /***********************************************************************
622 PROFILE_GetWineIniString( "Spy", "Include", "", buffer
, sizeof(buffer
) );
623 if (buffer
[0] && strcmp( buffer
, "INCLUDEALL" ))
625 dprintf_message( stddeb
, "SpyInit: Include=%s\n", buffer
);
626 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++)
627 SPY_Exclude
[i
] = (MessageTypeNames
[i
] && !strstr(buffer
,MessageTypeNames
[i
]));
630 PROFILE_GetWineIniString( "Spy", "Exclude", "", buffer
, sizeof(buffer
) );
633 dprintf_message( stddeb
, "SpyInit: Exclude=%s\n", buffer
);
634 if (!strcmp( buffer
, "EXCLUDEALL" ))
635 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++) SPY_Exclude
[i
] = TRUE
;
637 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++)
638 SPY_Exclude
[i
] = (MessageTypeNames
[i
] && strstr(buffer
,MessageTypeNames
[i
]));