2 * Message spying routines
4 * Copyright 1994, Bob Amstadt
10 #include "wine/winuser16.h"
11 #include "wine/winbase16.h"
15 #include "debugtools.h"
19 DEFAULT_DEBUG_CHANNEL(message
)
21 #define SPY_MAX_MSGNUM WM_USER
22 #define SPY_INDENT_UNIT 4 /* 4 spaces */
24 static const char * const MessageTypeNames
[SPY_MAX_MSGNUM
+ 1] =
42 "WM_CLOSE", /* 0x10 */
58 "WM_SETCURSOR", /* 0x20 */
74 "WM_SETFONT", /* 0x30 */
86 "wm_otherwindowcreated",
87 "wm_otherwindowdestroyed",
88 "wm_activateshellwindow",
92 "wm_compacting", NULL
, NULL
,
93 "WM_COMMNOTIFY", NULL
,
94 "WM_WINDOWPOSCHANGING", /* 0x0046 */
95 "WM_WINDOWPOSCHANGED", /* 0x0047 */
98 "WM_CANCELJOURNAL", NULL
, NULL
,
102 "WM_INPUTLANGCHANGEREQUEST",
103 "WM_INPUTLANGCHANGE",
107 "WM_NOTIFYFORMAT", NULL
, NULL
,
108 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
111 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
112 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
115 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
123 "WM_SETICON", /* 0x0080 */
124 "WM_NCCREATE", /* 0x0081 */
125 "WM_NCDESTROY", /* 0x0082 */
126 "WM_NCCALCSIZE", /* 0x0083 */
127 "WM_NCHITTEST", /* 0x0084 */
128 "WM_NCPAINT", /* 0x0085 */
129 "WM_NCACTIVATE", /* 0x0086 */
130 "WM_GETDLGCODE", /* 0x0087 */
132 "WM_SYNCTASK", NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
135 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
136 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
139 "WM_NCMOUSEMOVE", /* 0x00A0 */
140 "WM_NCLBUTTONDOWN", /* 0x00A1 */
141 "WM_NCLBUTTONUP", /* 0x00A2 */
142 "WM_NCLBUTTONDBLCLK", /* 0x00A3 */
143 "WM_NCRBUTTONDOWN", /* 0x00A4 */
144 "WM_NCRBUTTONUP", /* 0x00A5 */
145 "WM_NCRBUTTONDBLCLK", /* 0x00A6 */
146 "WM_NCMBUTTONDOWN", /* 0x00A7 */
147 "WM_NCMBUTTONUP", /* 0x00A8 */
148 "WM_NCMBUTTONDBLCLK", /* 0x00A9 */
149 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
151 /* 0x00B0 - Win32 Edit controls */
152 "EM_GETSEL32", /* 0x00b0 */
153 "EM_SETSEL32", /* 0x00b1 */
154 "EM_GETRECT32", /* 0x00b2 */
155 "EM_SETRECT32", /* 0x00b3 */
156 "EM_SETRECTNP32", /* 0x00b4 */
157 "EM_SCROLL32", /* 0x00b5 */
158 "EM_LINESCROLL32", /* 0x00b6 */
159 "EM_SCROLLCARET32", /* 0x00b7 */
160 "EM_GETMODIFY32", /* 0x00b8 */
161 "EM_SETMODIFY32", /* 0x00b9 */
162 "EM_GETLINECOUNT32", /* 0x00ba */
163 "EM_LINEINDEX32", /* 0x00bb */
164 "EM_SETHANDLE32", /* 0x00bc */
165 "EM_GETHANDLE32", /* 0x00bd */
166 "EM_GETTHUMB32", /* 0x00be */
170 "EM_LINELENGTH32", /* 0x00c1 */
171 "EM_REPLACESEL32", /* 0x00c2 */
173 "EM_GETLINE32", /* 0x00c4 */
174 "EM_LIMITTEXT32", /* 0x00c5 */
175 "EM_CANUNDO32", /* 0x00c6 */
176 "EM_UNDO32", /* 0x00c7 */
177 "EM_FMTLINES32", /* 0x00c8 */
178 "EM_LINEFROMCHAR32", /* 0x00c9 */
180 "EM_SETTABSTOPS32", /* 0x00cb */
181 "EM_SETPASSWORDCHAR32", /* 0x00cc */
182 "EM_EMPTYUNDOBUFFER32", /* 0x00cd */
183 "EM_GETFIRSTVISIBLELINE32", /* 0x00ce */
184 "EM_SETREADONLY32", /* 0x00cf */
186 "EM_SETWORDBREAKPROC32", /* 0x00d0 */
187 "EM_GETWORDBREAKPROC32", /* 0x00d1 */
188 "EM_GETPASSWORDCHAR32", /* 0x00d2 */
189 "EM_SETMARGINS32", /* 0x00d3 */
190 "EM_GETMARGINS32", /* 0x00d4 */
191 "EM_GETLIMITTEXT32", /* 0x00d5 */
192 "EM_POSFROMCHAR32", /* 0x00d6 */
193 "EM_CHARFROMPOS32", /* 0x00d7 */
194 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
196 /* 0x00E0 - Win32 Scrollbars */
197 "SBM_SETPOS32", /* 0x00e0 */
198 "SBM_GETPOS32", /* 0x00e1 */
199 "SBM_SETRANGE32", /* 0x00e2 */
200 "SBM_GETRANGE32", /* 0x00e3 */
201 "SBM_ENABLE_ARROWS32", /* 0x00e4 */
203 "SBM_SETRANGEREDRAW32", /* 0x00e6 */
205 "SBM_SETSCROLLINFO32", /* 0x00e9 */
206 "SBM_GETSCROLLINFO32", /* 0x00ea */
207 NULL
, NULL
, NULL
, NULL
, NULL
,
209 /* 0x00F0 - Win32 Buttons */
210 "BM_GETCHECK32", /* 0x00f0 */
211 "BM_SETCHECK32", /* 0x00f1 */
212 "BM_GETSTATE32", /* 0x00f2 */
213 "BM_SETSTATE32", /* 0x00f3 */
214 "BM_SETSTYLE32", /* 0x00f4 */
215 "BM_CLICK32", /* 0x00f5 */
216 "BM_GETIMAGE32", /* 0x00f6 */
217 "BM_SETIMAGE32", /* 0x00f7 */
218 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
220 "WM_KEYDOWN", /* 0x0100 */
221 "WM_KEYUP", /* 0x0101 */
222 "WM_CHAR", /* 0x0102 */
223 "WM_DEADCHAR", /* 0x0103 */
224 "WM_SYSKEYDOWN", /* 0x0104 */
225 "WM_SYSKEYUP", /* 0x0105 */
226 "WM_SYSCHAR", /* 0x0106 */
227 "WM_SYSDEADCHAR", /* 0x0107 */
228 "WM_KEYLAST", /* 0x0108 */
232 "WM_INTERIM", NULL
, NULL
, NULL
,
234 "WM_INITDIALOG", /* 0x0110 */
235 "WM_COMMAND", /* 0x0111 */
236 "WM_SYSCOMMAND", /* 0x0112 */
237 "WM_TIMER", /* 0x0113 */
238 "WM_HSCROLL", /* 0x0114 */
239 "WM_VSCROLL", /* 0x0115 */
240 "WM_INITMENU", /* 0x0116 */
241 "WM_INITMENUPOPUP", /* 0x0117 */
242 "WM_SYSTIMER", /* 0x0118 */
243 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
244 "WM_MENUSELECT", /* 0x011f */
246 "WM_MENUCHAR", /* 0x0120 */
247 "WM_ENTERIDLE", /* 0x0121 */
248 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
249 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
253 "WM_LBTRACKPOINT", /* 0x0131 */
254 "WM_CTLCOLORMSGBOX", /* 0x0132 */
255 "WM_CTLCOLOREDIT", /* 0x0133 */
256 "WM_CTLCOLORLISTBOX", /* 0x0134 */
257 "WM_CTLCOLORBTN", /* 0x0135 */
258 "WM_CTLCOLORDLG", /* 0x0136 */
259 "WM_CTLCOLORSCROLLBAR", /* 0x0137 */
260 "WM_CTLCOLORSTATIC", /* 0x0138 */
261 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
263 /* 0x0140 - Win32 Comboboxes */
264 "CB_GETEDITSEL32", /* 0x0140 */
265 "CB_LIMITTEXT32", /* 0x0141 */
266 "CB_SETEDITSEL32", /* 0x0142 */
267 "CB_ADDSTRING32", /* 0x0143 */
268 "CB_DELETESTRING32", /* 0x0144 */
269 "CB_DIR32", /* 0x0145 */
270 "CB_GETCOUNT32", /* 0x0146 */
271 "CB_GETCURSEL32", /* 0x0147 */
272 "CB_GETLBTEXT32", /* 0x0148 */
273 "CB_GETLBTEXTLEN32", /* 0x0149 */
274 "CB_INSERTSTRING32", /* 0x014a */
275 "CB_RESETCONTENT32", /* 0x014b */
276 "CB_FINDSTRING32", /* 0x014c */
277 "CB_SELECTSTRING32", /* 0x014d */
278 "CB_SETCURSEL32", /* 0x014e */
279 "CB_SHOWDROPDOWN32", /* 0x014f */
281 "CB_GETITEMDATA32", /* 0x0150 */
282 "CB_SETITEMDATA32", /* 0x0151 */
283 "CB_GETDROPPEDCONTROLRECT32",/* 0x0152 */
284 "CB_SETITEMHEIGHT32", /* 0x0153 */
285 "CB_GETITEMHEIGHT32", /* 0x0154 */
286 "CB_SETEXTENDEDUI32", /* 0x0155 */
287 "CB_GETEXTENDEDUI32", /* 0x0156 */
288 "CB_GETDROPPEDSTATE32", /* 0x0157 */
289 "CB_FINDSTRINGEXACT32", /* 0x0158 */
290 "CB_SETLOCALE32", /* 0x0159 */
291 "CB_GETLOCALE32", /* 0x015a */
292 "CB_GETTOPINDEX32", /* 0x015b */
293 "CB_SETTOPINDEX32", /* 0x015c */
294 "CB_GETHORIZONTALEXTENT32", /* 0x015d */
295 "CB_SETHORIZONTALEXTENT32", /* 0x015e */
296 "CB_GETDROPPEDWIDTH32", /* 0x015f */
298 "CB_SETDROPPEDWIDTH32", /* 0x0160 */
299 "CB_INITSTORAGE32", /* 0x0161 */
300 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
301 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
303 /* 0x0170 - Win32 Static controls */
304 "STM_SETICON32", /* 0x0170 */
305 "STM_GETICON32", /* 0x0171 */
306 "STM_SETIMAGE32", /* 0x0172 */
307 "STM_GETIMAGE32", /* 0x0173 */
308 NULL
, NULL
, NULL
, NULL
,
309 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
311 /* 0x0180 - Win32 Listboxes */
312 "LB_ADDSTRING32", /* 0x0180 */
313 "LB_INSERTSTRING32", /* 0x0181 */
314 "LB_DELETESTRING32", /* 0x0182 */
315 "LB_SELITEMRANGEEX32", /* 0x0183 */
316 "LB_RESETCONTENT32", /* 0x0184 */
317 "LB_SETSEL32", /* 0x0185 */
318 "LB_SETCURSEL32", /* 0x0186 */
319 "LB_GETSEL32", /* 0x0187 */
320 "LB_GETCURSEL32", /* 0x0188 */
321 "LB_GETTEXT32", /* 0x0189 */
322 "LB_GETTEXTLEN32", /* 0x018a */
323 "LB_GETCOUNT32", /* 0x018b */
324 "LB_SELECTSTRING32", /* 0x018c */
325 "LB_DIR32", /* 0x018d */
326 "LB_GETTOPINDEX32", /* 0x018e */
327 "LB_FINDSTRING32", /* 0x018f */
329 "LB_GETSELCOUNT32", /* 0x0190 */
330 "LB_GETSELITEMS32", /* 0x0191 */
331 "LB_SETTABSTOPS32", /* 0x0192 */
332 "LB_GETHORIZONTALEXTENT32", /* 0x0193 */
333 "LB_SETHORIZONTALEXTENT32", /* 0x0194 */
334 "LB_SETCOLUMNWIDTH32", /* 0x0195 */
335 "LB_ADDFILE32", /* 0x0196 */
336 "LB_SETTOPINDEX32", /* 0x0197 */
337 "LB_GETITEMRECT32", /* 0x0198 */
338 "LB_GETITEMDATA32", /* 0x0199 */
339 "LB_SETITEMDATA32", /* 0x019a */
340 "LB_SELITEMRANGE32", /* 0x019b */
341 "LB_SETANCHORINDEX32", /* 0x019c */
342 "LB_GETANCHORINDEX32", /* 0x019d */
343 "LB_SETCARETINDEX32", /* 0x019e */
344 "LB_GETCARETINDEX32", /* 0x019f */
346 "LB_SETITEMHEIGHT32", /* 0x01a0 */
347 "LB_GETITEMHEIGHT32", /* 0x01a1 */
348 "LB_FINDSTRINGEXACT32", /* 0x01a2 */
349 "LB_CARETON32", /* 0x01a3 */
350 "LB_CARETOFF32", /* 0x01a4 */
351 "LB_SETLOCALE32", /* 0x01a5 */
352 "LB_GETLOCALE32", /* 0x01a6 */
353 "LB_SETCOUNT32", /* 0x01a7 */
354 "LB_INITSTORAGE32", /* 0x01a8 */
355 "LB_ITEMFROMPOINT32", /* 0x01a9 */
356 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
359 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
360 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
363 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
364 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
367 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
368 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
371 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
372 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
375 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
376 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
378 "WM_MOUSEMOVE", /* 0x0200 */
379 "WM_LBUTTONDOWN", /* 0x0201 */
380 "WM_LBUTTONUP", /* 0x0202 */
381 "WM_LBUTTONDBLCLK", /* 0x0203 */
382 "WM_RBUTTONDOWN", /* 0x0204 */
383 "WM_RBUTTONUP", /* 0x0205 */
384 "WM_RBUTTONDBLCLK", /* 0x0206 */
385 "WM_MBUTTONDOWN", /* 0x0207 */
386 "WM_MBUTTONUP", /* 0x0208 */
387 "WM_MBUTTONDBLCLK", /* 0x0209 */
388 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
390 "WM_PARENTNOTIFY", /* 0x0210 */
391 "WM_ENTERMENULOOP", /* 0x0211 */
392 "WM_EXITMENULOOP", /* 0x0212 */
393 "WM_NEXTMENU", /* 0x0213 */
398 "WM_DEVICECHANGE", NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
400 "WM_MDICREATE", /* 0x0220 */
401 "WM_MDIDESTROY", /* 0x0221 */
402 "WM_MDIACTIVATE", /* 0x0222 */
403 "WM_MDIRESTORE", /* 0x0223 */
404 "WM_MDINEXT", /* 0x0224 */
405 "WM_MDIMAXIMIZE", /* 0x0225 */
406 "WM_MDITILE", /* 0x0226 */
407 "WM_MDICASCADE", /* 0x0227 */
408 "WM_MDIICONARRANGE", /* 0x0228 */
409 "WM_MDIGETACTIVE", /* 0x0229 */
412 "WM_QUERYDROPOBJECT",
419 "WM_MDISETMENU", /* 0x0230 */
420 "WM_ENTERSIZEMOVE", /* 0x0231 */
421 "WM_EXITSIZEMOVE", /* 0x0232 */
422 "WM_DROPFILES", /* 0x0233 */
423 "WM_MDIREFRESHMENU", NULL
, NULL
, NULL
,
425 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
428 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
429 NULL
, 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
,
436 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
437 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
,
442 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
,
447 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
448 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
449 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
450 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
453 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
454 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
455 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
456 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
458 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
459 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
460 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
461 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
463 "WM_CUT", /* 0x0300 */
469 "WM_RENDERALLFORMATS",
470 "WM_DESTROYCLIPBOARD",
473 "WM_VSCROLLCLIPBOARD",
475 "WM_ASKCBFORMATNAME",
477 "WM_HSCROLLCLIPBOARD",
478 "WM_QUERYNEWPALETTE", /* 0x030f*/
480 "WM_PALETTEISCHANGING",
482 "WM_HOTKEY", /* 0x0312 */
483 NULL
, NULL
, NULL
, NULL
,
486 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
,
490 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
491 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
494 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
495 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
496 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
497 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
499 "WM_QUERYAFXWNDPROC", /* 0x0360 */
500 "WM_SIZEPARENT", /* 0x0361 */
501 "WM_SETMESSAGESTRING", /* 0x0362 */
502 "WM_IDLEUPDATECMDUI", /* 0x0363 */
503 "WM_INITIALUPDATE", /* 0x0364 */
504 "WM_COMMANDHELP", /* 0x0365 */
505 "WM_HELPHITTEST", /* 0x0366 */
506 "WM_EXITHELPMODE", /* 0x0367 */
507 "WM_RECALCPARENT", /* 0x0368 */
508 "WM_SIZECHILD", /* 0x0369 */
509 "WM_KICKIDLE", /* 0x036A */
510 "WM_QUERYCENTERWND", /* 0x036B */
511 "WM_DISABLEMODAL", /* 0x036C */
512 "WM_FLOATSTATUS", /* 0x036D */
513 "WM_ACTIVATETOPLEVEL", /* 0x036E */
514 "WM_QUERY3DCONTROLS", /* 0x036F */
516 "WM_SOCKET_NOTIFY", /* 0x0373 */
517 "WM_SOCKET_DEAD", /* 0x0374 */
518 "WM_POPMESSAGESTRING", /* 0x0375 */
519 "WM_OCC_LOADFROMSTREAM", /* 0x0376 */
520 "WM_OCC_LOADFROMSTORAGE", /* 0x0377 */
521 "WM_OCC_INITNEW", /* 0x0378 */
522 "WM_QUEUE_SENTINEL", /* 0x0379 */
523 "WM_OCC_LOADFROMSTREAM_EX", /* 0x037A */
524 "WM_OCC_LOADFROMSTORAGE_EX", /* 0x037B */
536 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
539 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
540 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
548 NULL
, NULL
, NULL
, NULL
,
549 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
552 NULL
, NULL
, NULL
, NULL
, NULL
,
576 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
577 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
578 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
581 "WM_DDE_INITIATE", /* 0x3E0 */
582 "WM_DDE_TERMINATE", /* 0x3E1 */
583 "WM_DDE_ADVISE", /* 0x3E2 */
584 "WM_DDE_UNADVISE", /* 0x3E3 */
585 "WM_DDE_ACK", /* 0x3E4 */
586 "WM_DDE_DATA", /* 0x3E5 */
587 "WM_DDE_REQUEST", /* 0x3E6 */
588 "WM_DDE_POKE", /* 0x3E7 */
589 "WM_DDE_EXECUTE", /* 0x3E8 */
590 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
594 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
595 NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
,
601 #define SPY_MAX_LVMMSGNUM 139
602 static const char * const LVMMessageTypeNames
[SPY_MAX_LVMMSGNUM
+ 1] =
604 "LVM_GETBKCOLOR", /* 1000 */
613 "LVM_DELETEALLITEMS",
614 "LVM_GETCALLBACKMASK",
615 "LVM_SETCALLBACKMASK",
619 "LVM_SETITEMPOSITION",
620 "LVM_GETITEMPOSITION",
621 "LVM_GETSTRINGWIDTHA",
628 "LVM_GETEDITCONTROL",
633 "LVM_GETCOLUMNWIDTH",
634 "LVM_SETCOLUMNWIDTH",
636 "LVM_CREATEDRAGIMAGE",
640 "LVM_GETTEXTBKCOLOR",
641 "LVM_SETTEXTBKCOLOR",
643 "LVM_GETCOUNTPERPAGE",
652 "LVM_SETITEMPOSITION32",
653 "LVM_GETSELECTEDCOUNT",
654 "LVM_GETITEMSPACING",
655 "LVM_GETISEARCHSTRINGA",
656 "LVM_SETICONSPACING",
657 "LVM_SETEXTENDEDLISTVIEWSTYLE",
658 "LVM_GETEXTENDEDLISTVIEWSTYLE",
659 "LVM_GETSUBITEMRECT",
660 "LVM_SUBITEMHITTEST",
661 "LVM_SETCOLUMNORDERARRAY",
662 "LVM_GETCOLUMNORDERARRAY",
667 "LVM_APPROXIMATEVIEWRECT",
669 "LVM_GETSELECTIONMARK",
670 "LVM_SETSELECTIONMARK",
676 "LVM_GETNUMBEROFWORKAREAS",
690 "LVM_GETSTRINGWIDTHW",
720 "LVM_GETISEARCHSTRINGW",
743 "LVM_GETBKIMAGEW" /* 0x108B */
746 #define SPY_MAX_CCMMSGNUM 6
747 static const char * const CCMMessageTypeNames
[SPY_MAX_CCMMSGNUM
+ 1] =
751 "CCM_SETCOLORSCHEME",
752 "CCM_GETCOLORSCHEME",
754 "CCM_SETUNICODEFORMAT",
755 "CCM_GETUNICODEFORMAT"
758 static BOOL16 SPY_Exclude
[SPY_MAX_MSGNUM
+1];
759 static BOOL16 SPY_ExcludeDWP
= 0;
760 static int SPY_IndentLevel
= 0;
762 #define SPY_EXCLUDE(msg) \
763 (SPY_Exclude[(msg) > SPY_MAX_MSGNUM ? SPY_MAX_MSGNUM : (msg)])
765 /***********************************************************************
768 const char *SPY_GetMsgName( UINT msg
)
770 static char msg_buffer
[20];
772 if (msg
<= SPY_MAX_MSGNUM
)
774 if (!MessageTypeNames
[msg
]) return "???";
775 return MessageTypeNames
[msg
];
778 if (msg
>= LVM_FIRST
&& msg
<= LVM_FIRST
+ SPY_MAX_LVMMSGNUM
)
780 if (!LVMMessageTypeNames
[msg
-LVM_FIRST
]) return "LVM_?";
781 return LVMMessageTypeNames
[msg
-LVM_FIRST
];
784 if (msg
>= CCM_FIRST
&& msg
<= CCM_FIRST
+ SPY_MAX_CCMMSGNUM
)
786 if (!CCMMessageTypeNames
[msg
-CCM_FIRST
]) return "???";
787 return CCMMessageTypeNames
[msg
-CCM_FIRST
];
790 sprintf( msg_buffer
, "WM_USER+%04x", msg
- WM_USER
);
794 /***********************************************************************
797 const char *SPY_GetWndName( HWND hwnd
)
799 static char wnd_buffer
[16];
801 WND
* pWnd
= WIN_FindWndPtr( hwnd
);
804 INT n
= sizeof(wnd_buffer
) - 6;
805 LPSTR p
= wnd_buffer
;
810 if( pWnd
->text
&& pWnd
->text
[0] != '\0' )
813 *(p
++) = postfix
= '\"';
814 while ((n
-- > 1) && *src
) *p
++ = *src
++;
816 else /* get class name */
821 GlobalGetAtomNameA((ATOM
) GetClassWord(pWnd
->hwndSelf
, GCW_ATOM
), p
, n
+ 1);
822 src
= p
+= (len
= lstrlenA(p
));
823 if( len
>= n
) src
= wnd_buffer
; /* something nonzero */
826 if( *src
) for( n
= 0; n
< 3; n
++ ) *(p
++)='.';
829 WIN_ReleaseWndPtr(pWnd
);
832 else lstrcpyA( wnd_buffer
, "\"NULL\"" );
835 /***********************************************************************
838 void SPY_DumpStructure (UINT msg
, LPARAM structure
)
843 { DRAWITEMSTRUCT
*lpdis
= (DRAWITEMSTRUCT
*) structure
;
844 TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", lpdis
->CtlType
, lpdis
->CtlID
);
845 TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", lpdis
->itemID
, lpdis
->itemAction
, lpdis
->itemState
);
846 TRACE("hWnd=0x%04x hDC=0x%04x (%d,%d)-(%d,%d) itemData=0x%08lx\n",
847 lpdis
->hwndItem
, lpdis
->hDC
, lpdis
->rcItem
.left
, lpdis
->rcItem
.top
, lpdis
->rcItem
.right
, lpdis
->rcItem
.bottom
, lpdis
->itemData
);
851 { MEASUREITEMSTRUCT
*lpmis
= (MEASUREITEMSTRUCT
*) structure
;
852 TRACE("MEASUREITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", lpmis
->CtlType
, lpmis
->CtlID
);
853 TRACE("itemID=0x%08x itemWidth=0x%08x itemHeight=0x%08x\n", lpmis
->itemID
, lpmis
->itemWidth
, lpmis
->itemHeight
);
854 TRACE("itemData=0x%08lx\n", lpmis
->itemData
);
858 { NMHDR
* pnmh
= (NMHDR
*) structure
;
859 TRACE("NMHDR hwndFrom=0x%08x idFrom=0x%08x code=0x%08x\n", pnmh
->hwndFrom
, pnmh
->idFrom
, pnmh
->code
);
866 /***********************************************************************
869 void SPY_EnterMessage( INT iFlag
, HWND hWnd
, UINT msg
,
870 WPARAM wParam
, LPARAM lParam
)
874 if (!TRACE_ON(message
) || SPY_EXCLUDE(msg
)) return;
876 /* each SPY_SENDMESSAGE must be complemented by call to SPY_ExitMessage */
879 case SPY_DISPATCHMESSAGE16
:
880 pname
= SPY_GetWndName(hWnd
);
881 TRACE("%*s(%04x) %-16s message [%04x] %s dispatched wp=%04x lp=%08lx\n",
882 SPY_IndentLevel
, "", hWnd
, pname
, msg
, SPY_GetMsgName( msg
),
886 case SPY_DISPATCHMESSAGE
:
887 pname
= SPY_GetWndName(hWnd
);
888 TRACE("%*s(%08x) %-16s message [%04x] %s dispatched wp=%08x lp=%08lx\n",
889 SPY_IndentLevel
, "", hWnd
, pname
, msg
, SPY_GetMsgName( msg
),
893 case SPY_SENDMESSAGE16
:
894 case SPY_SENDMESSAGE
:
897 HTASK16 hTask
= GetWindowTask16(hWnd
);
899 if (hTask
== GetCurrentTask()) strcpy( taskName
, "self" );
900 else if (!hTask
) strcpy( taskName
, "Wine" );
903 sprintf( taskName
, "task %04x ???", hTask
);
904 GetModuleName16( hTask
, taskName
+ 10, sizeof(taskName
) - 10 );
906 pname
= SPY_GetWndName(hWnd
);
908 if (iFlag
== SPY_SENDMESSAGE16
)
909 TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
910 SPY_IndentLevel
, "", hWnd
, pname
, msg
, SPY_GetMsgName( msg
),
911 taskName
, wParam
, lParam
);
913 { TRACE("%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
914 SPY_IndentLevel
, "", hWnd
, pname
, msg
, SPY_GetMsgName( msg
),
915 taskName
, wParam
, lParam
);
916 SPY_DumpStructure(msg
, lParam
);
921 case SPY_DEFWNDPROC16
:
922 if( SPY_ExcludeDWP
) return;
923 TRACE("%*s(%04x) DefWindowProc16: %s [%04x] wp=%04x lp=%08lx\n",
924 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
),
925 msg
, wParam
, lParam
);
929 if( SPY_ExcludeDWP
) return;
930 TRACE("%*s(%08x) DefWindowProc32: %s [%04x] wp=%08x lp=%08lx\n",
931 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
),
932 msg
, wParam
, lParam
);
935 SPY_IndentLevel
+= SPY_INDENT_UNIT
;
939 /***********************************************************************
942 void SPY_ExitMessage( INT iFlag
, HWND hWnd
, UINT msg
, LRESULT lReturn
)
946 if (!TRACE_ON(message
) || SPY_EXCLUDE(msg
) ||
947 (SPY_ExcludeDWP
&& (iFlag
== SPY_RESULT_DEFWND16
|| iFlag
== SPY_RESULT_DEFWND
)) )
950 if (SPY_IndentLevel
) SPY_IndentLevel
-= SPY_INDENT_UNIT
;
954 case SPY_RESULT_DEFWND16
:
955 TRACE(" %*s(%04x) DefWindowProc16: %s [%04x] returned %08lx\n",
956 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
), msg
, lReturn
);
959 case SPY_RESULT_DEFWND
:
960 TRACE(" %*s(%08x) DefWindowProc32: %s [%04x] returned %08lx\n",
961 SPY_IndentLevel
, "", hWnd
, SPY_GetMsgName( msg
), msg
, lReturn
);
964 case SPY_RESULT_OK16
:
965 pname
= SPY_GetWndName(hWnd
);
966 TRACE(" %*s(%04x) %-16s message [%04x] %s returned %08lx\n",
967 SPY_IndentLevel
, "", hWnd
, pname
, msg
,
968 SPY_GetMsgName( msg
), lReturn
);
972 pname
= SPY_GetWndName(hWnd
);
973 TRACE(" %*s(%08x) %-16s message [%04x] %s returned %08lx\n",
974 SPY_IndentLevel
, "", hWnd
, pname
, msg
,
975 SPY_GetMsgName( msg
), lReturn
);
978 case SPY_RESULT_INVALIDHWND16
:
979 pname
= SPY_GetWndName(hWnd
);
980 WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n",
981 SPY_IndentLevel
, "", hWnd
, pname
, msg
,
982 SPY_GetMsgName( msg
) );
985 case SPY_RESULT_INVALIDHWND
:
986 pname
= SPY_GetWndName(hWnd
);
987 WARN(" %*s(%08x) %-16s message [%04x] %s HAS INVALID HWND\n",
988 SPY_IndentLevel
, "", hWnd
, pname
, msg
,
989 SPY_GetMsgName( msg
) );
995 /***********************************************************************
1003 if (!TRACE_ON(message
)) return TRUE
;
1005 PROFILE_GetWineIniString( "Spy", "Include", "", buffer
, sizeof(buffer
) );
1006 if (buffer
[0] && strcmp( buffer
, "INCLUDEALL" ))
1008 TRACE("Include=%s\n", buffer
);
1009 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++)
1010 SPY_Exclude
[i
] = (MessageTypeNames
[i
] && !strstr(buffer
,MessageTypeNames
[i
]));
1013 PROFILE_GetWineIniString( "Spy", "Exclude", "", buffer
, sizeof(buffer
) );
1016 TRACE("Exclude=%s\n", buffer
);
1017 if (!strcmp( buffer
, "EXCLUDEALL" ))
1018 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++) SPY_Exclude
[i
] = TRUE
;
1020 for (i
= 0; i
<= SPY_MAX_MSGNUM
; i
++)
1021 SPY_Exclude
[i
] = (MessageTypeNames
[i
] && strstr(buffer
,MessageTypeNames
[i
]));
1024 SPY_ExcludeDWP
= PROFILE_GetWineIniInt( "Spy", "ExcludeDWP", 0 );