Hello
when running a program using wine it's possible to log +message to get informed about all the messages which get sent. This debug channel displays the macro names like WM_NOTIFY instead of numbers. The most other debug channels and the regression tests however display numbers.
Functions like SPY_GetMsgName which can make window messages more human readable can be found in dlls/user32/spy.c.
Is there a acceptable way of making functions like SPY_GetMsgName available to other libraries and tests?
There are about 80 TRACE/trace lines which could be improved: egrep "trace.*hwnd.*lParam" dlls/ -R -i -I|grep -v user32|wc
Best regards, Florian
W dniu 07.09.2010 12:09, Florian Köberle pisze:
Hello
when running a program using wine it's possible to log +message to get informed about all the messages which get sent. This debug channel displays the macro names like WM_NOTIFY instead of numbers. The most other debug channels and the regression tests however display numbers.
Functions like SPY_GetMsgName which can make window messages more human readable can be found in dlls/user32/spy.c.
Is there a acceptable way of making functions like SPY_GetMsgName available to other libraries and tests?
There are about 80 TRACE/trace lines which could be improved: egrep "trace.*hwnd.*lParam" dlls/ -R -i -I|grep -v user32|wc
Best regards, Florian
Hello
In my opinion it would be good to make it available in similar way, as functions like debugstr_guid, which are defined in include/wine/debug.h
Messages' names are declared as an array MessageTypeNames in spy.c . Maybe it would be enough to copy it into the header and wrap access to it into simple function like debugstr_msg()? This is easiest way, but in the result there will be copy of array in each .so library. There will be also problem with multiple reference, but this may be solved following solution used in test.h.
I'm not so familiar with this, so maybe other, more experienced devs could say something about this idea.
Mariusz Pluciński
Hello
this patches increases the readability of debug channels logs and test traces by displaying the window message names instead of their numbers.
I haven't put the new functionality in include/wine/debug.h because it's mutally exclusive with include/wine/test.h. I have put it in a new include file so that it can only be included when it's needed.
I would like to know: a.) if my approach is general okay or if I need to take another approach. b.) if the names I have chosen for the file and methods are okay c.) if my patches aren't acceptable for another reason
Having these patches landed would really make logs more readable, just compare for yourself:
treeview.c:794: expected 0008 - actual 0008 treeview.c:794: expected 0281 - actual 000f treeview.c:794: expected 0282 - actual 000f treeview.c:794: expected 1118 - actual 000f treeview.c:794: Test marked todo: test get set tooltips: the msg 0x1118 was expected, but got msg 0x000f instead
with:
treeview.c:795: expected WM_KILLFOCUS - actual WM_KILLFOCUS treeview.c:795: expected WM_IME_SETCONTEXT - actual WM_PAINT treeview.c:795: expected WM_IME_NOTIFY - actual WM_PAINT treeview.c:795: expected TVM_SETTOOLTIPS - actual WM_PAINT treeview.c:795: Test marked todo: test get set tooltips: the msg TVM_SETTOOLTIPS was expected, but got msg WM_PAINT instead
Best regards, Florian
You forgot to attach a patch. J. Leclanche
On Sat, Sep 11, 2010 at 10:57 AM, Florian Köberle florian@fkoeberle.de wrote:
Hello
this patches increases the readability of debug channels logs and test traces by displaying the window message names instead of their numbers.
I haven't put the new functionality in include/wine/debug.h because it's mutally exclusive with include/wine/test.h. I have put it in a new include file so that it can only be included when it's needed.
I would like to know: a.) if my approach is general okay or if I need to take another approach. b.) if the names I have chosen for the file and methods are okay c.) if my patches aren't acceptable for another reason
Having these patches landed would really make logs more readable, just compare for yourself:
treeview.c:794: expected 0008 - actual 0008 treeview.c:794: expected 0281 - actual 000f treeview.c:794: expected 0282 - actual 000f treeview.c:794: expected 1118 - actual 000f treeview.c:794: Test marked todo: test get set tooltips: the msg 0x1118 was expected, but got msg 0x000f instead
with:
treeview.c:795: expected WM_KILLFOCUS - actual WM_KILLFOCUS treeview.c:795: expected WM_IME_SETCONTEXT - actual WM_PAINT treeview.c:795: expected WM_IME_NOTIFY - actual WM_PAINT treeview.c:795: expected TVM_SETTOOLTIPS - actual WM_PAINT treeview.c:795: Test marked todo: test get set tooltips: the msg TVM_SETTOOLTIPS was expected, but got msg WM_PAINT instead
Best regards, Florian
--- dlls/user32/spy.c | 1085 +-------------------------------------------- include/wine/resolvewm.h | 1119 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1124 insertions(+), 1080 deletions(-) create mode 100644 include/wine/resolvewm.h
diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index 26bd741..1fe2d5e 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -34,6 +34,7 @@ #include "commctrl.h" #include "commdlg.h" #include "richedit.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(message);
@@ -60,1066 +61,6 @@ static const char * const ClassLongOffsetNames[] = "GCLP_HICONSM", /* -34 */ };
-static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] = -{ - "WM_NULL", /* 0x00 */ - "WM_CREATE", - "WM_DESTROY", - "WM_MOVE", - "wm_sizewait", - "WM_SIZE", - "WM_ACTIVATE", - "WM_SETFOCUS", - "WM_KILLFOCUS", - "WM_SETVISIBLE", - "WM_ENABLE", - "WM_SETREDRAW", - "WM_SETTEXT", - "WM_GETTEXT", - "WM_GETTEXTLENGTH", - "WM_PAINT", - "WM_CLOSE", /* 0x10 */ - "WM_QUERYENDSESSION", - "WM_QUIT", - "WM_QUERYOPEN", - "WM_ERASEBKGND", - "WM_SYSCOLORCHANGE", - "WM_ENDSESSION", - "wm_systemerror", - "WM_SHOWWINDOW", - "WM_CTLCOLOR", - "WM_WININICHANGE", - "WM_DEVMODECHANGE", - "WM_ACTIVATEAPP", - "WM_FONTCHANGE", - "WM_TIMECHANGE", - "WM_CANCELMODE", - "WM_SETCURSOR", /* 0x20 */ - "WM_MOUSEACTIVATE", - "WM_CHILDACTIVATE", - "WM_QUEUESYNC", - "WM_GETMINMAXINFO", - "wm_unused3", - "wm_painticon", - "WM_ICONERASEBKGND", - "WM_NEXTDLGCTL", - "wm_alttabactive", - "WM_SPOOLERSTATUS", - "WM_DRAWITEM", - "WM_MEASUREITEM", - "WM_DELETEITEM", - "WM_VKEYTOITEM", - "WM_CHARTOITEM", - "WM_SETFONT", /* 0x30 */ - "WM_GETFONT", - "WM_SETHOTKEY", - "WM_GETHOTKEY", - "wm_filesyschange", - "wm_isactiveicon", - "wm_queryparkicon", - "WM_QUERYDRAGICON", - "wm_querysavestate", - "WM_COMPAREITEM", - "wm_testing", - NULL, - NULL, - "WM_GETOBJECT", /* 0x3d */ - "wm_activateshellwindow", - NULL, - - NULL, /* 0x40 */ - "wm_compacting", NULL, NULL, - "WM_COMMNOTIFY", NULL, - "WM_WINDOWPOSCHANGING", /* 0x0046 */ - "WM_WINDOWPOSCHANGED", /* 0x0047 */ - "WM_POWER", NULL, - "WM_COPYDATA", - "WM_CANCELJOURNAL", NULL, NULL, - "WM_NOTIFY", NULL, - - /* 0x0050 */ - "WM_INPUTLANGCHANGEREQUEST", - "WM_INPUTLANGCHANGE", - "WM_TCARD", - "WM_HELP", - "WM_USERCHANGED", - "WM_NOTIFYFORMAT", NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0060 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0070 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, - "WM_CONTEXTMENU", - "WM_STYLECHANGING", - "WM_STYLECHANGED", - "WM_DISPLAYCHANGE", - "WM_GETICON", - - "WM_SETICON", /* 0x0080 */ - "WM_NCCREATE", /* 0x0081 */ - "WM_NCDESTROY", /* 0x0082 */ - "WM_NCCALCSIZE", /* 0x0083 */ - "WM_NCHITTEST", /* 0x0084 */ - "WM_NCPAINT", /* 0x0085 */ - "WM_NCACTIVATE", /* 0x0086 */ - "WM_GETDLGCODE", /* 0x0087 */ - "WM_SYNCPAINT", - "WM_SYNCTASK", NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0090 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x00A0 */ - "WM_NCMOUSEMOVE", /* 0x00a0 */ - "WM_NCLBUTTONDOWN", /* 0x00a1 */ - "WM_NCLBUTTONUP", /* 0x00a2 */ - "WM_NCLBUTTONDBLCLK", /* 0x00a3 */ - "WM_NCRBUTTONDOWN", /* 0x00a4 */ - "WM_NCRBUTTONUP", /* 0x00a5 */ - "WM_NCRBUTTONDBLCLK", /* 0x00a6 */ - "WM_NCMBUTTONDOWN", /* 0x00a7 */ - "WM_NCMBUTTONUP", /* 0x00a8 */ - "WM_NCMBUTTONDBLCLK", /* 0x00a9 */ - NULL, /* 0x00aa */ - "WM_NCXBUTTONDOWN", /* 0x00ab */ - "WM_NCXBUTTONUP", /* 0x00ac */ - "WM_NCXBUTTONDBLCLK", /* 0x00ad */ - NULL, /* 0x00ae */ - NULL, /* 0x00af */ - - /* 0x00B0 - Win32 Edit controls */ - "EM_GETSEL", /* 0x00b0 */ - "EM_SETSEL", /* 0x00b1 */ - "EM_GETRECT", /* 0x00b2 */ - "EM_SETRECT", /* 0x00b3 */ - "EM_SETRECTNP", /* 0x00b4 */ - "EM_SCROLL", /* 0x00b5 */ - "EM_LINESCROLL", /* 0x00b6 */ - "EM_SCROLLCARET", /* 0x00b7 */ - "EM_GETMODIFY", /* 0x00b8 */ - "EM_SETMODIFY", /* 0x00b9 */ - "EM_GETLINECOUNT", /* 0x00ba */ - "EM_LINEINDEX", /* 0x00bb */ - "EM_SETHANDLE", /* 0x00bc */ - "EM_GETHANDLE", /* 0x00bd */ - "EM_GETTHUMB", /* 0x00be */ - NULL, /* 0x00bf */ - - NULL, /* 0x00c0 */ - "EM_LINELENGTH", /* 0x00c1 */ - "EM_REPLACESEL", /* 0x00c2 */ - NULL, /* 0x00c3 */ - "EM_GETLINE", /* 0x00c4 */ - "EM_LIMITTEXT", /* 0x00c5 */ - "EM_CANUNDO", /* 0x00c6 */ - "EM_UNDO", /* 0x00c7 */ - "EM_FMTLINES", /* 0x00c8 */ - "EM_LINEFROMCHAR", /* 0x00c9 */ - NULL, /* 0x00ca */ - "EM_SETTABSTOPS", /* 0x00cb */ - "EM_SETPASSWORDCHAR", /* 0x00cc */ - "EM_EMPTYUNDOBUFFER", /* 0x00cd */ - "EM_GETFIRSTVISIBLELINE", /* 0x00ce */ - "EM_SETREADONLY", /* 0x00cf */ - - "EM_SETWORDBREAKPROC", /* 0x00d0 */ - "EM_GETWORDBREAKPROC", /* 0x00d1 */ - "EM_GETPASSWORDCHAR", /* 0x00d2 */ - "EM_SETMARGINS", /* 0x00d3 */ - "EM_GETMARGINS", /* 0x00d4 */ - "EM_GETLIMITTEXT", /* 0x00d5 */ - "EM_POSFROMCHAR", /* 0x00d6 */ - "EM_CHARFROMPOS", /* 0x00d7 */ - "EM_SETIMESTATUS", /* 0x00d8 */ - "EM_GETIMESTATUS", /* 0x00d9 */ - NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x00E0 - Win32 Scrollbars */ - "SBM_SETPOS", /* 0x00e0 */ - "SBM_GETPOS", /* 0x00e1 */ - "SBM_SETRANGE", /* 0x00e2 */ - "SBM_GETRANGE", /* 0x00e3 */ - "SBM_ENABLE_ARROWS", /* 0x00e4 */ - NULL, - "SBM_SETRANGEREDRAW", /* 0x00e6 */ - NULL, NULL, - "SBM_SETSCROLLINFO", /* 0x00e9 */ - "SBM_GETSCROLLINFO", /* 0x00ea */ - NULL, NULL, NULL, NULL, NULL, - - /* 0x00F0 - Win32 Buttons */ - "BM_GETCHECK", /* 0x00f0 */ - "BM_SETCHECK", /* 0x00f1 */ - "BM_GETSTATE", /* 0x00f2 */ - "BM_SETSTATE", /* 0x00f3 */ - "BM_SETSTYLE", /* 0x00f4 */ - "BM_CLICK", /* 0x00f5 */ - "BM_GETIMAGE", /* 0x00f6 */ - "BM_SETIMAGE", /* 0x00f7 */ - NULL, NULL, NULL, NULL, NULL, NULL, - "WM_INPUT_DEVICE_CHANGE", /* 0x00fe */ - "WM_INPUT", /* 0x00ff */ - - "WM_KEYDOWN", /* 0x0100 */ - "WM_KEYUP", /* 0x0101 */ - "WM_CHAR", /* 0x0102 */ - "WM_DEADCHAR", /* 0x0103 */ - "WM_SYSKEYDOWN", /* 0x0104 */ - "WM_SYSKEYUP", /* 0x0105 */ - "WM_SYSCHAR", /* 0x0106 */ - "WM_SYSDEADCHAR", /* 0x0107 */ - NULL, - "WM_UNICHAR", /* 0x0109 */ - "WM_CONVERTREQUEST", /* 0x010a */ - "WM_CONVERTRESULT", /* 0x010b */ - "WM_INTERIM", /* 0x010c */ - "WM_IME_STARTCOMPOSITION", /* 0x010d */ - "WM_IME_ENDCOMPOSITION", /* 0x010e */ - "WM_IME_COMPOSITION", /* 0x010f */ - - "WM_INITDIALOG", /* 0x0110 */ - "WM_COMMAND", /* 0x0111 */ - "WM_SYSCOMMAND", /* 0x0112 */ - "WM_TIMER", /* 0x0113 */ - "WM_HSCROLL", /* 0x0114 */ - "WM_VSCROLL", /* 0x0115 */ - "WM_INITMENU", /* 0x0116 */ - "WM_INITMENUPOPUP", /* 0x0117 */ - "WM_SYSTIMER", /* 0x0118 */ - NULL, NULL, NULL, NULL, NULL, NULL, - "WM_MENUSELECT", /* 0x011f */ - - "WM_MENUCHAR", /* 0x0120 */ - "WM_ENTERIDLE", /* 0x0121 */ - - "WM_MENURBUTTONUP", /* 0x0122 */ - "WM_MENUDRAG", /* 0x0123 */ - "WM_MENUGETOBJECT", /* 0x0124 */ - "WM_UNINITMENUPOPUP", /* 0x0125 */ - "WM_MENUCOMMAND", /* 0x0126 */ - "WM_CHANGEUISTATE", /* 0x0127 */ - "WM_UPDATEUISTATE", /* 0x0128 */ - "WM_QUERYUISTATE", /* 0x0129 */ - - NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0130 */ - NULL, - "WM_LBTRACKPOINT", /* 0x0131 */ - "WM_CTLCOLORMSGBOX", /* 0x0132 */ - "WM_CTLCOLOREDIT", /* 0x0133 */ - "WM_CTLCOLORLISTBOX", /* 0x0134 */ - "WM_CTLCOLORBTN", /* 0x0135 */ - "WM_CTLCOLORDLG", /* 0x0136 */ - "WM_CTLCOLORSCROLLBAR", /* 0x0137 */ - "WM_CTLCOLORSTATIC", /* 0x0138 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0140 - Win32 Comboboxes */ - "CB_GETEDITSEL", /* 0x0140 */ - "CB_LIMITTEXT", /* 0x0141 */ - "CB_SETEDITSEL", /* 0x0142 */ - "CB_ADDSTRING", /* 0x0143 */ - "CB_DELETESTRING", /* 0x0144 */ - "CB_DIR", /* 0x0145 */ - "CB_GETCOUNT", /* 0x0146 */ - "CB_GETCURSEL", /* 0x0147 */ - "CB_GETLBTEXT", /* 0x0148 */ - "CB_GETLBTEXTLEN", /* 0x0149 */ - "CB_INSERTSTRING", /* 0x014a */ - "CB_RESETCONTENT", /* 0x014b */ - "CB_FINDSTRING", /* 0x014c */ - "CB_SELECTSTRING", /* 0x014d */ - "CB_SETCURSEL", /* 0x014e */ - "CB_SHOWDROPDOWN", /* 0x014f */ - - "CB_GETITEMDATA", /* 0x0150 */ - "CB_SETITEMDATA", /* 0x0151 */ - "CB_GETDROPPEDCONTROLRECT", /* 0x0152 */ - "CB_SETITEMHEIGHT", /* 0x0153 */ - "CB_GETITEMHEIGHT", /* 0x0154 */ - "CB_SETEXTENDEDUI", /* 0x0155 */ - "CB_GETEXTENDEDUI", /* 0x0156 */ - "CB_GETDROPPEDSTATE", /* 0x0157 */ - "CB_FINDSTRINGEXACT", /* 0x0158 */ - "CB_SETLOCALE", /* 0x0159 */ - "CB_GETLOCALE", /* 0x015a */ - "CB_GETTOPINDEX", /* 0x015b */ - "CB_SETTOPINDEX", /* 0x015c */ - "CB_GETHORIZONTALEXTENT", /* 0x015d */ - "CB_SETHORIZONTALEXTENT", /* 0x015e */ - "CB_GETDROPPEDWIDTH", /* 0x015f */ - - "CB_SETDROPPEDWIDTH", /* 0x0160 */ - "CB_INITSTORAGE", /* 0x0161 */ - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0170 - Win32 Static controls */ - "STM_SETICON", /* 0x0170 */ - "STM_GETICON", /* 0x0171 */ - "STM_SETIMAGE", /* 0x0172 */ - "STM_GETIMAGE", /* 0x0173 */ - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0180 - Win32 Listboxes */ - "LB_ADDSTRING", /* 0x0180 */ - "LB_INSERTSTRING", /* 0x0181 */ - "LB_DELETESTRING", /* 0x0182 */ - "LB_SELITEMRANGEEX", /* 0x0183 */ - "LB_RESETCONTENT", /* 0x0184 */ - "LB_SETSEL", /* 0x0185 */ - "LB_SETCURSEL", /* 0x0186 */ - "LB_GETSEL", /* 0x0187 */ - "LB_GETCURSEL", /* 0x0188 */ - "LB_GETTEXT", /* 0x0189 */ - "LB_GETTEXTLEN", /* 0x018a */ - "LB_GETCOUNT", /* 0x018b */ - "LB_SELECTSTRING", /* 0x018c */ - "LB_DIR", /* 0x018d */ - "LB_GETTOPINDEX", /* 0x018e */ - "LB_FINDSTRING", /* 0x018f */ - - "LB_GETSELCOUNT", /* 0x0190 */ - "LB_GETSELITEMS", /* 0x0191 */ - "LB_SETTABSTOPS", /* 0x0192 */ - "LB_GETHORIZONTALEXTENT", /* 0x0193 */ - "LB_SETHORIZONTALEXTENT", /* 0x0194 */ - "LB_SETCOLUMNWIDTH", /* 0x0195 */ - "LB_ADDFILE", /* 0x0196 */ - "LB_SETTOPINDEX", /* 0x0197 */ - "LB_GETITEMRECT", /* 0x0198 */ - "LB_GETITEMDATA", /* 0x0199 */ - "LB_SETITEMDATA", /* 0x019a */ - "LB_SELITEMRANGE", /* 0x019b */ - "LB_SETANCHORINDEX", /* 0x019c */ - "LB_GETANCHORINDEX", /* 0x019d */ - "LB_SETCARETINDEX", /* 0x019e */ - "LB_GETCARETINDEX", /* 0x019f */ - - "LB_SETITEMHEIGHT", /* 0x01a0 */ - "LB_GETITEMHEIGHT", /* 0x01a1 */ - "LB_FINDSTRINGEXACT", /* 0x01a2 */ - "LB_CARETON", /* 0x01a3 */ - "LB_CARETOFF", /* 0x01a4 */ - "LB_SETLOCALE", /* 0x01a5 */ - "LB_GETLOCALE", /* 0x01a6 */ - "LB_SETCOUNT", /* 0x01a7 */ - "LB_INITSTORAGE", /* 0x01a8 */ - "LB_ITEMFROMPOINT", /* 0x01a9 */ - NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x01B0 */ - NULL, NULL, - "LB_GETLISTBOXINFO", /* 0x01b2 */ - NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x01C0 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x01D0 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x01E0 */ - NULL, - "MN_GETHMENU", /* 0x01E1 */ - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x01F0 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - "WM_MOUSEMOVE", /* 0x0200 */ - "WM_LBUTTONDOWN", /* 0x0201 */ - "WM_LBUTTONUP", /* 0x0202 */ - "WM_LBUTTONDBLCLK", /* 0x0203 */ - "WM_RBUTTONDOWN", /* 0x0204 */ - "WM_RBUTTONUP", /* 0x0205 */ - "WM_RBUTTONDBLCLK", /* 0x0206 */ - "WM_MBUTTONDOWN", /* 0x0207 */ - "WM_MBUTTONUP", /* 0x0208 */ - "WM_MBUTTONDBLCLK", /* 0x0209 */ - "WM_MOUSEWHEEL", /* 0x020A */ - "WM_XBUTTONDOWN", /* 0x020B */ - "WM_XBUTTONUP", /* 0x020C */ - "WM_XBUTTONDBLCLK", /* 0x020D */ - "WM_MOUSEHWHEEL", /* 0x020E */ - NULL, - - "WM_PARENTNOTIFY", /* 0x0210 */ - "WM_ENTERMENULOOP", /* 0x0211 */ - "WM_EXITMENULOOP", /* 0x0212 */ - "WM_NEXTMENU", /* 0x0213 */ - "WM_SIZING", - "WM_CAPTURECHANGED", - "WM_MOVING", NULL, - "WM_POWERBROADCAST", - "WM_DEVICECHANGE", NULL, NULL, NULL, NULL, NULL, NULL, - - "WM_MDICREATE", /* 0x0220 */ - "WM_MDIDESTROY", /* 0x0221 */ - "WM_MDIACTIVATE", /* 0x0222 */ - "WM_MDIRESTORE", /* 0x0223 */ - "WM_MDINEXT", /* 0x0224 */ - "WM_MDIMAXIMIZE", /* 0x0225 */ - "WM_MDITILE", /* 0x0226 */ - "WM_MDICASCADE", /* 0x0227 */ - "WM_MDIICONARRANGE", /* 0x0228 */ - "WM_MDIGETACTIVE", /* 0x0229 */ - - "WM_DROPOBJECT", - "WM_QUERYDROPOBJECT", - "WM_BEGINDRAG", - "WM_DRAGLOOP", - "WM_DRAGSELECT", - "WM_DRAGMOVE", - - /* 0x0230*/ - "WM_MDISETMENU", /* 0x0230 */ - "WM_ENTERSIZEMOVE", /* 0x0231 */ - "WM_EXITSIZEMOVE", /* 0x0232 */ - "WM_DROPFILES", /* 0x0233 */ - "WM_MDIREFRESHMENU", NULL, NULL, NULL, - /* 0x0238*/ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0240 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0250 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0260 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x0280 */ - NULL, - "WM_IME_SETCONTEXT", /* 0x0281 */ - "WM_IME_NOTIFY", /* 0x0282 */ - "WM_IME_CONTROL", /* 0x0283 */ - "WM_IME_COMPOSITIONFULL", /* 0x0284 */ - "WM_IME_SELECT", /* 0x0285 */ - "WM_IME_CHAR", /* 0x0286 */ - NULL, - "WM_IME_REQUEST", /* 0x0288 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_IME_KEYDOWN", /* 0x0290 */ - "WM_IME_KEYUP", /* 0x0291 */ - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x02a0 */ - "WM_NCMOUSEHOVER", /* 0x02A0 */ - "WM_MOUSEHOVER", /* 0x02A1 */ - "WM_NCMOUSELEAVE", /* 0x02A2 */ - "WM_MOUSELEAVE", /* 0x02A3 */ - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_WTSSESSION_CHANGE", /* 0x02B1 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x02c0 */ - "WM_TABLET_FIRST", /* 0x02c0 */ - "WM_TABLET_FIRST+1", /* 0x02c1 */ - "WM_TABLET_FIRST+2", /* 0x02c2 */ - "WM_TABLET_FIRST+3", /* 0x02c3 */ - "WM_TABLET_FIRST+4", /* 0x02c4 */ - "WM_TABLET_FIRST+5", /* 0x02c5 */ - "WM_TABLET_FIRST+7", /* 0x02c6 */ - "WM_TABLET_FIRST+8", /* 0x02c7 */ - "WM_TABLET_FIRST+9", /* 0x02c8 */ - "WM_TABLET_FIRST+10", /* 0x02c9 */ - "WM_TABLET_FIRST+11", /* 0x02ca */ - "WM_TABLET_FIRST+12", /* 0x02cb */ - "WM_TABLET_FIRST+13", /* 0x02cc */ - "WM_TABLET_FIRST+14", /* 0x02cd */ - "WM_TABLET_FIRST+15", /* 0x02ce */ - "WM_TABLET_FIRST+16", /* 0x02cf */ - "WM_TABLET_FIRST+17", /* 0x02d0 */ - "WM_TABLET_FIRST+18", /* 0x02d1 */ - "WM_TABLET_FIRST+19", /* 0x02d2 */ - "WM_TABLET_FIRST+20", /* 0x02d3 */ - "WM_TABLET_FIRST+21", /* 0x02d4 */ - "WM_TABLET_FIRST+22", /* 0x02d5 */ - "WM_TABLET_FIRST+23", /* 0x02d6 */ - "WM_TABLET_FIRST+24", /* 0x02d7 */ - "WM_TABLET_FIRST+25", /* 0x02d8 */ - "WM_TABLET_FIRST+26", /* 0x02d9 */ - "WM_TABLET_FIRST+27", /* 0x02da */ - "WM_TABLET_FIRST+28", /* 0x02db */ - "WM_TABLET_FIRST+29", /* 0x02dc */ - "WM_TABLET_FIRST+30", /* 0x02dd */ - "WM_TABLET_FIRST+31", /* 0x02de */ - "WM_TABLET_LAST", /* 0x02df */ - - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - "WM_CUT", /* 0x0300 */ - "WM_COPY", - "WM_PASTE", - "WM_CLEAR", - "WM_UNDO", - "WM_RENDERFORMAT", - "WM_RENDERALLFORMATS", - "WM_DESTROYCLIPBOARD", - "WM_DRAWCLIPBOARD", - "WM_PAINTCLIPBOARD", - "WM_VSCROLLCLIPBOARD", - "WM_SIZECLIPBOARD", - "WM_ASKCBFORMATNAME", - "WM_CHANGECBCHAIN", - "WM_HSCROLLCLIPBOARD", - "WM_QUERYNEWPALETTE", /* 0x030f*/ - - "WM_PALETTEISCHANGING", - "WM_PALETTECHANGED", - "WM_HOTKEY", /* 0x0312 */ - "WM_POPUPSYSTEMMENU", /* 0x0313 */ - NULL, NULL, NULL, - "WM_PRINT", /* 0x0317 */ - "WM_PRINTCLIENT", /* 0x0318 */ - "WM_APPCOMMAND", /* 0x0319 */ - "WM_THEMECHANGED", /* 0x031A */ - NULL, NULL, - "WM_CLIPBOARDUPDATE", /* 0x031D */ - "WM_DWMCOMPOSITIONCHANGED", /* 0x031E */ - "WM_DWMNCRENDERINGCHANGED", /* 0x031F */ - - "WM_DWMCOLORIZATIONCOLORCHANGED", /* 0x0320 */ - "WM_DWMWINDOWMAXIMIZEDCHANGE", /* 0x0321 */ - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_GETTITLEBARINFOEX", /* 0x033F */ - - /* 0x0340 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - /* 0x0350 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_HANDHELDFIRST", /* 0x0358 */ - "WM_HANDHELDFIRST+1", /* 0x0359 */ - "WM_HANDHELDFIRST+2", /* 0x035A */ - "WM_HANDHELDFIRST+3", /* 0x035B */ - "WM_HANDHELDFIRST+4", /* 0x035C */ - "WM_HANDHELDFIRST+5", /* 0x035D */ - "WM_HANDHELDFIRST+6", /* 0x035E */ - "WM_HANDHELDLAST", /* 0x035F */ - - "WM_QUERYAFXWNDPROC", /* 0x0360 WM_AFXFIRST */ - "WM_SIZEPARENT", /* 0x0361 */ - "WM_SETMESSAGESTRING", /* 0x0362 */ - "WM_IDLEUPDATECMDUI", /* 0x0363 */ - "WM_INITIALUPDATE", /* 0x0364 */ - "WM_COMMANDHELP", /* 0x0365 */ - "WM_HELPHITTEST", /* 0x0366 */ - "WM_EXITHELPMODE", /* 0x0367 */ - "WM_RECALCPARENT", /* 0x0368 */ - "WM_SIZECHILD", /* 0x0369 */ - "WM_KICKIDLE", /* 0x036A */ - "WM_QUERYCENTERWND", /* 0x036B */ - "WM_DISABLEMODAL", /* 0x036C */ - "WM_FLOATSTATUS", /* 0x036D */ - "WM_ACTIVATETOPLEVEL", /* 0x036E */ - "WM_QUERY3DCONTROLS", /* 0x036F */ - NULL,NULL,NULL, - "WM_SOCKET_NOTIFY", /* 0x0373 */ - "WM_SOCKET_DEAD", /* 0x0374 */ - "WM_POPMESSAGESTRING", /* 0x0375 */ - "WM_OCC_LOADFROMSTREAM", /* 0x0376 */ - "WM_OCC_LOADFROMSTORAGE", /* 0x0377 */ - "WM_OCC_INITNEW", /* 0x0378 */ - "WM_QUEUE_SENTINEL", /* 0x0379 */ - "WM_OCC_LOADFROMSTREAM_EX", /* 0x037A */ - "WM_OCC_LOADFROMSTORAGE_EX", /* 0x037B */ - - NULL,NULL,NULL, - "WM_AFXLAST", /* 0x037F */ - - "WM_PENWINFIRST", /* 0x0380 */ - "WM_RCRESULT", /* 0x0381 */ - "WM_HOOKRCRESULT", /* 0x0382 */ - "WM_GLOBALRCCHANGE", /* 0x0383 */ - "WM_SKB", /* 0x0384 */ - "WM_HEDITCTL", /* 0x0385 */ - NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_PENWINLAST", /* 0x038F */ - - "WM_COALESCE_FIRST", /* 0x0390 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "WM_COALESCE_LAST", /* 0x039F */ - - /* 0x03a0 */ - "MM_JOY1MOVE", - "MM_JOY2MOVE", - "MM_JOY1ZMOVE", - "MM_JOY2ZMOVE", - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x03b0 */ - NULL, NULL, NULL, NULL, NULL, - "MM_JOY1BUTTONDOWN", - "MM_JOY2BUTTONDOWN", - "MM_JOY1BUTTONUP", - "MM_JOY2BUTTONUP", - "MM_MCINOTIFY", - NULL, - "MM_WOM_OPEN", - "MM_WOM_CLOSE", - "MM_WOM_DONE", - "MM_WIM_OPEN", - "MM_WIM_CLOSE", - - /* 0x03c0 */ - "MM_WIM_DATA", - "MM_MIM_OPEN", - "MM_MIM_CLOSE", - "MM_MIM_DATA", - "MM_MIM_LONGDATA", - "MM_MIM_ERROR", - "MM_MIM_LONGERROR", - "MM_MOM_OPEN", - "MM_MOM_CLOSE", - "MM_MOM_DONE", - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - /* 0x03e0 */ - "WM_DDE_INITIATE", /* 0x3E0 */ - "WM_DDE_TERMINATE", /* 0x3E1 */ - "WM_DDE_ADVISE", /* 0x3E2 */ - "WM_DDE_UNADVISE", /* 0x3E3 */ - "WM_DDE_ACK", /* 0x3E4 */ - "WM_DDE_DATA", /* 0x3E5 */ - "WM_DDE_REQUEST", /* 0x3E6 */ - "WM_DDE_POKE", /* 0x3E7 */ - "WM_DDE_EXECUTE", /* 0x3E8 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - - /* 0x03f0 */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - - "WM_USER" /* 0x0400 */ -}; - - -#define SPY_MAX_LVMMSGNUM 182 -static const char * const LVMMessageTypeNames[SPY_MAX_LVMMSGNUM + 1] = -{ - "LVM_GETBKCOLOR", /* 1000 */ - "LVM_SETBKCOLOR", - "LVM_GETIMAGELIST", - "LVM_SETIMAGELIST", - "LVM_GETITEMCOUNT", - "LVM_GETITEMA", - "LVM_SETITEMA", - "LVM_INSERTITEMA", - "LVM_DELETEITEM", - "LVM_DELETEALLITEMS", - "LVM_GETCALLBACKMASK", - "LVM_SETCALLBACKMASK", - "LVM_GETNEXTITEM", - "LVM_FINDITEMA", - "LVM_GETITEMRECT", - "LVM_SETITEMPOSITION", - "LVM_GETITEMPOSITION", - "LVM_GETSTRINGWIDTHA", - "LVM_HITTEST", - "LVM_ENSUREVISIBLE", - "LVM_SCROLL", - "LVM_REDRAWITEMS", - "LVM_ARRANGE", - "LVM_EDITLABELA", - "LVM_GETEDITCONTROL", - "LVM_GETCOLUMNA", - "LVM_SETCOLUMNA", - "LVM_INSERTCOLUMNA", - "LVM_DELETECOLUMN", - "LVM_GETCOLUMNWIDTH", - "LVM_SETCOLUMNWIDTH", - "LVM_GETHEADER", - NULL, - "LVM_CREATEDRAGIMAGE", - "LVM_GETVIEWRECT", - "LVM_GETTEXTCOLOR", - "LVM_SETTEXTCOLOR", - "LVM_GETTEXTBKCOLOR", - "LVM_SETTEXTBKCOLOR", - "LVM_GETTOPINDEX", - "LVM_GETCOUNTPERPAGE", - "LVM_GETORIGIN", - "LVM_UPDATE", - "LVM_SETITEMSTATE", - "LVM_GETITEMSTATE", - "LVM_GETITEMTEXTA", - "LVM_SETITEMTEXTA", - "LVM_SETITEMCOUNT", - "LVM_SORTITEMS", - "LVM_SETITEMPOSITION32", - "LVM_GETSELECTEDCOUNT", - "LVM_GETITEMSPACING", - "LVM_GETISEARCHSTRINGA", - "LVM_SETICONSPACING", - "LVM_SETEXTENDEDLISTVIEWSTYLE", - "LVM_GETEXTENDEDLISTVIEWSTYLE", - "LVM_GETSUBITEMRECT", - "LVM_SUBITEMHITTEST", - "LVM_SETCOLUMNORDERARRAY", - "LVM_GETCOLUMNORDERARRAY", - "LVM_SETHOTITEM", - "LVM_GETHOTITEM", - "LVM_SETHOTCURSOR", - "LVM_GETHOTCURSOR", - "LVM_APPROXIMATEVIEWRECT", - "LVM_SETWORKAREAS", - "LVM_GETSELECTIONMARK", - "LVM_SETSELECTIONMARK", - "LVM_SETBKIMAGEA", - "LVM_GETBKIMAGEA", - "LVM_GETWORKAREAS", - "LVM_SETHOVERTIME", - "LVM_GETHOVERTIME", - "LVM_GETNUMBEROFWORKAREAS", - "LVM_SETTOOLTIPS", - "LVM_GETITEMW", - "LVM_SETITEMW", - "LVM_INSERTITEMW", - "LVM_GETTOOLTIPS", - NULL, - NULL, - NULL, - NULL, - "LVM_FINDITEMW", - NULL, - NULL, - NULL, - "LVM_GETSTRINGWIDTHW", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "LVM_GETCOLUMNW", - "LVM_SETCOLUMNW", - "LVM_INSERTCOLUMNW", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "LVM_GETITEMTEXTW", - "LVM_SETITEMTEXTW", - "LVM_GETISEARCHSTRINGW", - "LVM_EDITLABELW", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "LVM_SETBKIMAGEW", - "LVM_GETBKIMAGEW", /* 0x108B */ - "LVM_SETSELECTEDCOLUMN", - "LVM_SETTILEWIDTH", - "LVM_SETVIEW", - "LVM_GETVIEW", - NULL, - "LVM_INSERTGROUP", - NULL, - "LVM_SETGROUPINFO", - NULL, - "LVM_GETGROUPINFO", - "LVM_REMOVEGROUP", - "LVM_MOVEGROUP", - NULL, - NULL, - "LVM_MOVEITEMTOGROUP", - "LVM_SETGROUPMETRICS", - "LVM_GETGROUPMETRICS", - "LVM_ENABLEGROUPVIEW", - "LVM_SORTGROUPS", - "LVM_INSERTGROUPSORTED", - "LVM_REMOVEALLGROUPS", - "LVM_HASGROUP", - "LVM_SETTILEVIEWINFO", - "LVM_GETTILEVIEWINFO", - "LVM_SETTILEINFO", - "LVM_GETTILEINFO", - "LVM_SETINSERTMARK", - "LVM_GETINSERTMARK", - "LVM_INSERTMARKHITTEST", - "LVM_GETINSERTMARKRECT", - "LVM_SETINSERTMARKCOLOR", - "LVM_GETINSERTMARKCOLOR", - NULL, - "LVM_SETINFOTIP", - "LVM_GETSELECTEDCOLUMN", - "LVM_ISGROUPVIEWENABLED", - "LVM_GETOUTLINECOLOR", - "LVM_SETOUTLINECOLOR", - NULL, - "LVM_CANCELEDITLABEL", - "LVM_MAPINDEXTOID", - "LVM_MAPIDTOINDEX", - "LVM_ISITEMVISIBLE" -}; - - -#define SPY_MAX_TVMSGNUM 65 -static const char * const TVMessageTypeNames[SPY_MAX_TVMSGNUM + 1] = -{ - "TVM_INSERTITEMA", /* 1100 */ - "TVM_DELETEITEM", - "TVM_EXPAND", - NULL, - "TVM_GETITEMRECT", - "TVM_GETCOUNT", - "TVM_GETINDENT", - "TVM_SETINDENT", - "TVM_GETIMAGELIST", - "TVM_SETIMAGELIST", - "TVM_GETNEXTITEM", - "TVM_SELECTITEM", - "TVM_GETITEMA", - "TVM_SETITEMA", - "TVM_EDITLABELA", - "TVM_GETEDITCONTROL", - "TVM_GETVISIBLECOUNT", - "TVM_HITTEST", - "TVM_CREATEDRAGIMAGE", - "TVM_SORTCHILDREN", - "TVM_ENSUREVISIBLE", - "TVM_SORTCHILDRENCB", - "TVM_ENDEDITLABELNOW", - "TVM_GETISEARCHSTRINGA", - "TVM_SETTOOLTIPS", - "TVM_GETTOOLTIPS", - "TVM_SETINSERTMARK", - "TVM_SETITEMHEIGHT", - "TVM_GETITEMHEIGHT", - "TVM_SETBKCOLOR", - "TVM_SETTEXTCOLOR", - "TVM_GETBKCOLOR", - "TVM_GETTEXTCOLOR", - "TVM_SETSCROLLTIME", - "TVM_GETSCROLLTIME", - "TVM_UNKNOWN35", - "TVM_UNKNOWN36", - "TVM_SETINSERTMARKCOLOR", - "TVM_GETINSERTMARKCOLOR", - "TVM_GETITEMSTATE", - "TVM_SETLINECOLOR", - "TVM_GETLINECOLOR", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "TVM_INSERTITEMW", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "TVM_GETITEMW", - "TVM_SETITEMW", - "TVM_GETISEARCHSTRINGW", - "TVM_EDITLABELW" -}; - - -#define SPY_MAX_HDMMSGNUM 19 -static const char * const HDMMessageTypeNames[SPY_MAX_HDMMSGNUM + 1] = -{ - "HDM_GETITEMCOUNT", /* 1200 */ - "HDM_INSERTITEMA", - "HDM_DELETEITEM", - "HDM_GETITEMA", - "HDM_SETITEMA", - "HDM_LAYOUT", - "HDM_HITTEST", - "HDM_GETITEMRECT", - "HDM_SETIMAGELIST", - "HDM_GETIMAGELIST", - "HDM_INSERTITEMW", - "HDM_GETITEMW", - "HDM_SETITEMW", - NULL, - NULL, - "HDM_ORDERTOINDEX", - "HDM_CREATEDRAGIMAGE", - "GETORDERARRAYINDEX", - "SETORDERARRAYINDEX", - "SETHOTDIVIDER" -}; - - -#define SPY_MAX_TCMMSGNUM 62 -static const char * const TCMMessageTypeNames[SPY_MAX_TCMMSGNUM + 1] = -{ - NULL, /* 1300 */ - NULL, - "TCM_SETIMAGELIST", - "TCM_GETIMAGELIST", - "TCM_GETITEMCOUNT", - "TCM_GETITEMA", - "TCM_SETITEMA", - "TCM_INSERTITEMA", - "TCM_DELETEITEM", - "TCM_DELETEALLITEMS", - "TCM_GETITEMRECT", - "TCM_GETCURSEL", - "TCM_SETCURSEL", - "TCM_HITTEST", - "TCM_SETITEMEXTRA", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "TCM_ADJUSTRECT", - "TCM_SETITEMSIZE", - "TCM_REMOVEIMAGE", - "TCM_SETPADDING", - "TCM_GETROWCOUNT", - "TCM_GETTOOLTIPS", - "TCM_SETTOOLTIPS", - "TCM_GETCURFOCUS", - "TCM_SETCURFOCUS", - "TCM_SETMINTABWIDTH", - "TCM_DESELECTALL", - "TCM_HIGHLIGHTITEM", - "TCM_SETEXTENDEDSTYLE", - "TCM_GETEXTENDEDSTYLE", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "TCM_GETITEMW", - "TCM_SETITEMW", - "TCM_INSERTITEMW" -}; - -#define SPY_MAX_PGMMSGNUM 13 -static const char * const PGMMessageTypeNames[SPY_MAX_PGMMSGNUM + 1] = -{ - NULL, /* 1400 */ - "PGM_SETCHILD", - "PGM_RECALCSIZE", - "PGM_FORWARDMOUSE", - "PGM_SETBKCOLOR", - "PGM_GETBKCOLOR", - "PGM_SETBORDER", - "PGM_GETBORDER", - "PGM_SETPOS", - "PGM_GETPOS", - "PGM_SETBUTTONSIZE", - "PGM_GETBUTTONSIZE", - "PGM_GETBUTTONSTATE", - "PGM_GETDROPTARGET" -}; - - -#define SPY_MAX_CCMMSGNUM 9 -static const char * const CCMMessageTypeNames[SPY_MAX_CCMMSGNUM + 1] = -{ - NULL, /* 0x2000 */ - "CCM_SETBKCOLOR", - "CCM_SETCOLORSCHEME", - "CCM_GETCOLORSCHEME", - "CCM_GETDROPTARGET", - "CCM_SETUNICODEFORMAT", - "CCM_GETUNICODEFORMAT", - "CCM_SETVERSION", - "CCM_GETVERSION", - "CCM_SETNOTIFYWINDOW" -}; - #define SPY_MAX_WINEMSGNUM (WM_WINE_MOUSE_LL_HOOK - WM_WINE_DESTROYWINDOW) static const char * const WINEMessageTypeNames[SPY_MAX_WINEMSGNUM + 1] = { @@ -2036,26 +977,10 @@ static inline void set_indent_level( INT_PTR level ) */ static const char *SPY_GetMsgInternal( UINT msg ) { - if (msg <= SPY_MAX_MSGNUM) - return MessageTypeNames[msg]; - - if (msg >= LVM_FIRST && msg <= LVM_FIRST + SPY_MAX_LVMMSGNUM) - return LVMMessageTypeNames[msg-LVM_FIRST]; - - if (msg >= TV_FIRST && msg <= TV_FIRST + SPY_MAX_TVMSGNUM) - return TVMessageTypeNames[msg-TV_FIRST]; - - if (msg >= HDM_FIRST && msg <= HDM_FIRST + SPY_MAX_HDMMSGNUM) - return HDMMessageTypeNames[msg-HDM_FIRST]; - - if (msg >= TCM_FIRST && msg <= TCM_FIRST + SPY_MAX_TCMMSGNUM) - return TCMMessageTypeNames[msg-TCM_FIRST]; - - if (msg >= PGM_FIRST && msg <= PGM_FIRST + SPY_MAX_PGMMSGNUM) - return PGMMessageTypeNames[msg-PGM_FIRST]; - - if (msg >= CCM_FIRST && msg <= CCM_FIRST + SPY_MAX_CCMMSGNUM) - return CCMMessageTypeNames[msg-CCM_FIRST]; + const char * str; + str = ResolveWindowMessage(msg); + if (str) + return str;
if (msg >= WM_WINE_DESTROYWINDOW && msg <= WM_WINE_DESTROYWINDOW + SPY_MAX_WINEMSGNUM) return WINEMessageTypeNames[msg-WM_WINE_DESTROYWINDOW]; diff --git a/include/wine/resolvewm.h b/include/wine/resolvewm.h new file mode 100644 index 0000000..573f9ee --- /dev/null +++ b/include/wine/resolvewm.h @@ -0,0 +1,1119 @@ +/* + * Wine methods to convert window message numbers into strings. + * + * Copyright 1994, Bob Amstadt + * 1995, Alex Korobka + * 2010, Florian Köberle + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_RESOLVEWM_H +#define __WINE_WINE_RESOLVEWM_H + +#define RESOLVEWM_MAX_MSGNUM WM_USER + +static const char * const MessageTypeNames[RESOLVEWM_MAX_MSGNUM + 1] = +{ + "WM_NULL", /* 0x00 */ + "WM_CREATE", + "WM_DESTROY", + "WM_MOVE", + "wm_sizewait", + "WM_SIZE", + "WM_ACTIVATE", + "WM_SETFOCUS", + "WM_KILLFOCUS", + "WM_SETVISIBLE", + "WM_ENABLE", + "WM_SETREDRAW", + "WM_SETTEXT", + "WM_GETTEXT", + "WM_GETTEXTLENGTH", + "WM_PAINT", + "WM_CLOSE", /* 0x10 */ + "WM_QUERYENDSESSION", + "WM_QUIT", + "WM_QUERYOPEN", + "WM_ERASEBKGND", + "WM_SYSCOLORCHANGE", + "WM_ENDSESSION", + "wm_systemerror", + "WM_SHOWWINDOW", + "WM_CTLCOLOR", + "WM_WININICHANGE", + "WM_DEVMODECHANGE", + "WM_ACTIVATEAPP", + "WM_FONTCHANGE", + "WM_TIMECHANGE", + "WM_CANCELMODE", + "WM_SETCURSOR", /* 0x20 */ + "WM_MOUSEACTIVATE", + "WM_CHILDACTIVATE", + "WM_QUEUESYNC", + "WM_GETMINMAXINFO", + "wm_unused3", + "wm_painticon", + "WM_ICONERASEBKGND", + "WM_NEXTDLGCTL", + "wm_alttabactive", + "WM_SPOOLERSTATUS", + "WM_DRAWITEM", + "WM_MEASUREITEM", + "WM_DELETEITEM", + "WM_VKEYTOITEM", + "WM_CHARTOITEM", + "WM_SETFONT", /* 0x30 */ + "WM_GETFONT", + "WM_SETHOTKEY", + "WM_GETHOTKEY", + "wm_filesyschange", + "wm_isactiveicon", + "wm_queryparkicon", + "WM_QUERYDRAGICON", + "wm_querysavestate", + "WM_COMPAREITEM", + "wm_testing", + NULL, + NULL, + "WM_GETOBJECT", /* 0x3d */ + "wm_activateshellwindow", + NULL, + + NULL, /* 0x40 */ + "wm_compacting", NULL, NULL, + "WM_COMMNOTIFY", NULL, + "WM_WINDOWPOSCHANGING", /* 0x0046 */ + "WM_WINDOWPOSCHANGED", /* 0x0047 */ + "WM_POWER", NULL, + "WM_COPYDATA", + "WM_CANCELJOURNAL", NULL, NULL, + "WM_NOTIFY", NULL, + + /* 0x0050 */ + "WM_INPUTLANGCHANGEREQUEST", + "WM_INPUTLANGCHANGE", + "WM_TCARD", + "WM_HELP", + "WM_USERCHANGED", + "WM_NOTIFYFORMAT", NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0060 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0070 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, + "WM_CONTEXTMENU", + "WM_STYLECHANGING", + "WM_STYLECHANGED", + "WM_DISPLAYCHANGE", + "WM_GETICON", + + "WM_SETICON", /* 0x0080 */ + "WM_NCCREATE", /* 0x0081 */ + "WM_NCDESTROY", /* 0x0082 */ + "WM_NCCALCSIZE", /* 0x0083 */ + "WM_NCHITTEST", /* 0x0084 */ + "WM_NCPAINT", /* 0x0085 */ + "WM_NCACTIVATE", /* 0x0086 */ + "WM_GETDLGCODE", /* 0x0087 */ + "WM_SYNCPAINT", + "WM_SYNCTASK", NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0090 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x00A0 */ + "WM_NCMOUSEMOVE", /* 0x00a0 */ + "WM_NCLBUTTONDOWN", /* 0x00a1 */ + "WM_NCLBUTTONUP", /* 0x00a2 */ + "WM_NCLBUTTONDBLCLK", /* 0x00a3 */ + "WM_NCRBUTTONDOWN", /* 0x00a4 */ + "WM_NCRBUTTONUP", /* 0x00a5 */ + "WM_NCRBUTTONDBLCLK", /* 0x00a6 */ + "WM_NCMBUTTONDOWN", /* 0x00a7 */ + "WM_NCMBUTTONUP", /* 0x00a8 */ + "WM_NCMBUTTONDBLCLK", /* 0x00a9 */ + NULL, /* 0x00aa */ + "WM_NCXBUTTONDOWN", /* 0x00ab */ + "WM_NCXBUTTONUP", /* 0x00ac */ + "WM_NCXBUTTONDBLCLK", /* 0x00ad */ + NULL, /* 0x00ae */ + NULL, /* 0x00af */ + + /* 0x00B0 - Win32 Edit controls */ + "EM_GETSEL", /* 0x00b0 */ + "EM_SETSEL", /* 0x00b1 */ + "EM_GETRECT", /* 0x00b2 */ + "EM_SETRECT", /* 0x00b3 */ + "EM_SETRECTNP", /* 0x00b4 */ + "EM_SCROLL", /* 0x00b5 */ + "EM_LINESCROLL", /* 0x00b6 */ + "EM_SCROLLCARET", /* 0x00b7 */ + "EM_GETMODIFY", /* 0x00b8 */ + "EM_SETMODIFY", /* 0x00b9 */ + "EM_GETLINECOUNT", /* 0x00ba */ + "EM_LINEINDEX", /* 0x00bb */ + "EM_SETHANDLE", /* 0x00bc */ + "EM_GETHANDLE", /* 0x00bd */ + "EM_GETTHUMB", /* 0x00be */ + NULL, /* 0x00bf */ + + NULL, /* 0x00c0 */ + "EM_LINELENGTH", /* 0x00c1 */ + "EM_REPLACESEL", /* 0x00c2 */ + NULL, /* 0x00c3 */ + "EM_GETLINE", /* 0x00c4 */ + "EM_LIMITTEXT", /* 0x00c5 */ + "EM_CANUNDO", /* 0x00c6 */ + "EM_UNDO", /* 0x00c7 */ + "EM_FMTLINES", /* 0x00c8 */ + "EM_LINEFROMCHAR", /* 0x00c9 */ + NULL, /* 0x00ca */ + "EM_SETTABSTOPS", /* 0x00cb */ + "EM_SETPASSWORDCHAR", /* 0x00cc */ + "EM_EMPTYUNDOBUFFER", /* 0x00cd */ + "EM_GETFIRSTVISIBLELINE", /* 0x00ce */ + "EM_SETREADONLY", /* 0x00cf */ + + "EM_SETWORDBREAKPROC", /* 0x00d0 */ + "EM_GETWORDBREAKPROC", /* 0x00d1 */ + "EM_GETPASSWORDCHAR", /* 0x00d2 */ + "EM_SETMARGINS", /* 0x00d3 */ + "EM_GETMARGINS", /* 0x00d4 */ + "EM_GETLIMITTEXT", /* 0x00d5 */ + "EM_POSFROMCHAR", /* 0x00d6 */ + "EM_CHARFROMPOS", /* 0x00d7 */ + "EM_SETIMESTATUS", /* 0x00d8 */ + "EM_GETIMESTATUS", /* 0x00d9 */ + NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x00E0 - Win32 Scrollbars */ + "SBM_SETPOS", /* 0x00e0 */ + "SBM_GETPOS", /* 0x00e1 */ + "SBM_SETRANGE", /* 0x00e2 */ + "SBM_GETRANGE", /* 0x00e3 */ + "SBM_ENABLE_ARROWS", /* 0x00e4 */ + NULL, + "SBM_SETRANGEREDRAW", /* 0x00e6 */ + NULL, NULL, + "SBM_SETSCROLLINFO", /* 0x00e9 */ + "SBM_GETSCROLLINFO", /* 0x00ea */ + NULL, NULL, NULL, NULL, NULL, + + /* 0x00F0 - Win32 Buttons */ + "BM_GETCHECK", /* 0x00f0 */ + "BM_SETCHECK", /* 0x00f1 */ + "BM_GETSTATE", /* 0x00f2 */ + "BM_SETSTATE", /* 0x00f3 */ + "BM_SETSTYLE", /* 0x00f4 */ + "BM_CLICK", /* 0x00f5 */ + "BM_GETIMAGE", /* 0x00f6 */ + "BM_SETIMAGE", /* 0x00f7 */ + NULL, NULL, NULL, NULL, NULL, NULL, + "WM_INPUT_DEVICE_CHANGE", /* 0x00fe */ + "WM_INPUT", /* 0x00ff */ + + "WM_KEYDOWN", /* 0x0100 */ + "WM_KEYUP", /* 0x0101 */ + "WM_CHAR", /* 0x0102 */ + "WM_DEADCHAR", /* 0x0103 */ + "WM_SYSKEYDOWN", /* 0x0104 */ + "WM_SYSKEYUP", /* 0x0105 */ + "WM_SYSCHAR", /* 0x0106 */ + "WM_SYSDEADCHAR", /* 0x0107 */ + NULL, + "WM_UNICHAR", /* 0x0109 */ + "WM_CONVERTREQUEST", /* 0x010a */ + "WM_CONVERTRESULT", /* 0x010b */ + "WM_INTERIM", /* 0x010c */ + "WM_IME_STARTCOMPOSITION", /* 0x010d */ + "WM_IME_ENDCOMPOSITION", /* 0x010e */ + "WM_IME_COMPOSITION", /* 0x010f */ + + "WM_INITDIALOG", /* 0x0110 */ + "WM_COMMAND", /* 0x0111 */ + "WM_SYSCOMMAND", /* 0x0112 */ + "WM_TIMER", /* 0x0113 */ + "WM_HSCROLL", /* 0x0114 */ + "WM_VSCROLL", /* 0x0115 */ + "WM_INITMENU", /* 0x0116 */ + "WM_INITMENUPOPUP", /* 0x0117 */ + "WM_SYSTIMER", /* 0x0118 */ + NULL, NULL, NULL, NULL, NULL, NULL, + "WM_MENUSELECT", /* 0x011f */ + + "WM_MENUCHAR", /* 0x0120 */ + "WM_ENTERIDLE", /* 0x0121 */ + + "WM_MENURBUTTONUP", /* 0x0122 */ + "WM_MENUDRAG", /* 0x0123 */ + "WM_MENUGETOBJECT", /* 0x0124 */ + "WM_UNINITMENUPOPUP", /* 0x0125 */ + "WM_MENUCOMMAND", /* 0x0126 */ + "WM_CHANGEUISTATE", /* 0x0127 */ + "WM_UPDATEUISTATE", /* 0x0128 */ + "WM_QUERYUISTATE", /* 0x0129 */ + + NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0130 */ + NULL, + "WM_LBTRACKPOINT", /* 0x0131 */ + "WM_CTLCOLORMSGBOX", /* 0x0132 */ + "WM_CTLCOLOREDIT", /* 0x0133 */ + "WM_CTLCOLORLISTBOX", /* 0x0134 */ + "WM_CTLCOLORBTN", /* 0x0135 */ + "WM_CTLCOLORDLG", /* 0x0136 */ + "WM_CTLCOLORSCROLLBAR", /* 0x0137 */ + "WM_CTLCOLORSTATIC", /* 0x0138 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0140 - Win32 Comboboxes */ + "CB_GETEDITSEL", /* 0x0140 */ + "CB_LIMITTEXT", /* 0x0141 */ + "CB_SETEDITSEL", /* 0x0142 */ + "CB_ADDSTRING", /* 0x0143 */ + "CB_DELETESTRING", /* 0x0144 */ + "CB_DIR", /* 0x0145 */ + "CB_GETCOUNT", /* 0x0146 */ + "CB_GETCURSEL", /* 0x0147 */ + "CB_GETLBTEXT", /* 0x0148 */ + "CB_GETLBTEXTLEN", /* 0x0149 */ + "CB_INSERTSTRING", /* 0x014a */ + "CB_RESETCONTENT", /* 0x014b */ + "CB_FINDSTRING", /* 0x014c */ + "CB_SELECTSTRING", /* 0x014d */ + "CB_SETCURSEL", /* 0x014e */ + "CB_SHOWDROPDOWN", /* 0x014f */ + + "CB_GETITEMDATA", /* 0x0150 */ + "CB_SETITEMDATA", /* 0x0151 */ + "CB_GETDROPPEDCONTROLRECT", /* 0x0152 */ + "CB_SETITEMHEIGHT", /* 0x0153 */ + "CB_GETITEMHEIGHT", /* 0x0154 */ + "CB_SETEXTENDEDUI", /* 0x0155 */ + "CB_GETEXTENDEDUI", /* 0x0156 */ + "CB_GETDROPPEDSTATE", /* 0x0157 */ + "CB_FINDSTRINGEXACT", /* 0x0158 */ + "CB_SETLOCALE", /* 0x0159 */ + "CB_GETLOCALE", /* 0x015a */ + "CB_GETTOPINDEX", /* 0x015b */ + "CB_SETTOPINDEX", /* 0x015c */ + "CB_GETHORIZONTALEXTENT", /* 0x015d */ + "CB_SETHORIZONTALEXTENT", /* 0x015e */ + "CB_GETDROPPEDWIDTH", /* 0x015f */ + + "CB_SETDROPPEDWIDTH", /* 0x0160 */ + "CB_INITSTORAGE", /* 0x0161 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0170 - Win32 Static controls */ + "STM_SETICON", /* 0x0170 */ + "STM_GETICON", /* 0x0171 */ + "STM_SETIMAGE", /* 0x0172 */ + "STM_GETIMAGE", /* 0x0173 */ + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0180 - Win32 Listboxes */ + "LB_ADDSTRING", /* 0x0180 */ + "LB_INSERTSTRING", /* 0x0181 */ + "LB_DELETESTRING", /* 0x0182 */ + "LB_SELITEMRANGEEX", /* 0x0183 */ + "LB_RESETCONTENT", /* 0x0184 */ + "LB_SETSEL", /* 0x0185 */ + "LB_SETCURSEL", /* 0x0186 */ + "LB_GETSEL", /* 0x0187 */ + "LB_GETCURSEL", /* 0x0188 */ + "LB_GETTEXT", /* 0x0189 */ + "LB_GETTEXTLEN", /* 0x018a */ + "LB_GETCOUNT", /* 0x018b */ + "LB_SELECTSTRING", /* 0x018c */ + "LB_DIR", /* 0x018d */ + "LB_GETTOPINDEX", /* 0x018e */ + "LB_FINDSTRING", /* 0x018f */ + + "LB_GETSELCOUNT", /* 0x0190 */ + "LB_GETSELITEMS", /* 0x0191 */ + "LB_SETTABSTOPS", /* 0x0192 */ + "LB_GETHORIZONTALEXTENT", /* 0x0193 */ + "LB_SETHORIZONTALEXTENT", /* 0x0194 */ + "LB_SETCOLUMNWIDTH", /* 0x0195 */ + "LB_ADDFILE", /* 0x0196 */ + "LB_SETTOPINDEX", /* 0x0197 */ + "LB_GETITEMRECT", /* 0x0198 */ + "LB_GETITEMDATA", /* 0x0199 */ + "LB_SETITEMDATA", /* 0x019a */ + "LB_SELITEMRANGE", /* 0x019b */ + "LB_SETANCHORINDEX", /* 0x019c */ + "LB_GETANCHORINDEX", /* 0x019d */ + "LB_SETCARETINDEX", /* 0x019e */ + "LB_GETCARETINDEX", /* 0x019f */ + + "LB_SETITEMHEIGHT", /* 0x01a0 */ + "LB_GETITEMHEIGHT", /* 0x01a1 */ + "LB_FINDSTRINGEXACT", /* 0x01a2 */ + "LB_CARETON", /* 0x01a3 */ + "LB_CARETOFF", /* 0x01a4 */ + "LB_SETLOCALE", /* 0x01a5 */ + "LB_GETLOCALE", /* 0x01a6 */ + "LB_SETCOUNT", /* 0x01a7 */ + "LB_INITSTORAGE", /* 0x01a8 */ + "LB_ITEMFROMPOINT", /* 0x01a9 */ + NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x01B0 */ + NULL, NULL, + "LB_GETLISTBOXINFO", /* 0x01b2 */ + NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x01C0 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x01D0 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x01E0 */ + NULL, + "MN_GETHMENU", /* 0x01E1 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x01F0 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + "WM_MOUSEMOVE", /* 0x0200 */ + "WM_LBUTTONDOWN", /* 0x0201 */ + "WM_LBUTTONUP", /* 0x0202 */ + "WM_LBUTTONDBLCLK", /* 0x0203 */ + "WM_RBUTTONDOWN", /* 0x0204 */ + "WM_RBUTTONUP", /* 0x0205 */ + "WM_RBUTTONDBLCLK", /* 0x0206 */ + "WM_MBUTTONDOWN", /* 0x0207 */ + "WM_MBUTTONUP", /* 0x0208 */ + "WM_MBUTTONDBLCLK", /* 0x0209 */ + "WM_MOUSEWHEEL", /* 0x020A */ + "WM_XBUTTONDOWN", /* 0x020B */ + "WM_XBUTTONUP", /* 0x020C */ + "WM_XBUTTONDBLCLK", /* 0x020D */ + "WM_MOUSEHWHEEL", /* 0x020E */ + NULL, + + "WM_PARENTNOTIFY", /* 0x0210 */ + "WM_ENTERMENULOOP", /* 0x0211 */ + "WM_EXITMENULOOP", /* 0x0212 */ + "WM_NEXTMENU", /* 0x0213 */ + "WM_SIZING", + "WM_CAPTURECHANGED", + "WM_MOVING", NULL, + "WM_POWERBROADCAST", + "WM_DEVICECHANGE", NULL, NULL, NULL, NULL, NULL, NULL, + + "WM_MDICREATE", /* 0x0220 */ + "WM_MDIDESTROY", /* 0x0221 */ + "WM_MDIACTIVATE", /* 0x0222 */ + "WM_MDIRESTORE", /* 0x0223 */ + "WM_MDINEXT", /* 0x0224 */ + "WM_MDIMAXIMIZE", /* 0x0225 */ + "WM_MDITILE", /* 0x0226 */ + "WM_MDICASCADE", /* 0x0227 */ + "WM_MDIICONARRANGE", /* 0x0228 */ + "WM_MDIGETACTIVE", /* 0x0229 */ + + "WM_DROPOBJECT", + "WM_QUERYDROPOBJECT", + "WM_BEGINDRAG", + "WM_DRAGLOOP", + "WM_DRAGSELECT", + "WM_DRAGMOVE", + + /* 0x0230*/ + "WM_MDISETMENU", /* 0x0230 */ + "WM_ENTERSIZEMOVE", /* 0x0231 */ + "WM_EXITSIZEMOVE", /* 0x0232 */ + "WM_DROPFILES", /* 0x0233 */ + "WM_MDIREFRESHMENU", NULL, NULL, NULL, + /* 0x0238*/ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0240 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0250 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0260 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x0280 */ + NULL, + "WM_IME_SETCONTEXT", /* 0x0281 */ + "WM_IME_NOTIFY", /* 0x0282 */ + "WM_IME_CONTROL", /* 0x0283 */ + "WM_IME_COMPOSITIONFULL", /* 0x0284 */ + "WM_IME_SELECT", /* 0x0285 */ + "WM_IME_CHAR", /* 0x0286 */ + NULL, + "WM_IME_REQUEST", /* 0x0288 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_IME_KEYDOWN", /* 0x0290 */ + "WM_IME_KEYUP", /* 0x0291 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x02a0 */ + "WM_NCMOUSEHOVER", /* 0x02A0 */ + "WM_MOUSEHOVER", /* 0x02A1 */ + "WM_NCMOUSELEAVE", /* 0x02A2 */ + "WM_MOUSELEAVE", /* 0x02A3 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_WTSSESSION_CHANGE", /* 0x02B1 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x02c0 */ + "WM_TABLET_FIRST", /* 0x02c0 */ + "WM_TABLET_FIRST+1", /* 0x02c1 */ + "WM_TABLET_FIRST+2", /* 0x02c2 */ + "WM_TABLET_FIRST+3", /* 0x02c3 */ + "WM_TABLET_FIRST+4", /* 0x02c4 */ + "WM_TABLET_FIRST+5", /* 0x02c5 */ + "WM_TABLET_FIRST+7", /* 0x02c6 */ + "WM_TABLET_FIRST+8", /* 0x02c7 */ + "WM_TABLET_FIRST+9", /* 0x02c8 */ + "WM_TABLET_FIRST+10", /* 0x02c9 */ + "WM_TABLET_FIRST+11", /* 0x02ca */ + "WM_TABLET_FIRST+12", /* 0x02cb */ + "WM_TABLET_FIRST+13", /* 0x02cc */ + "WM_TABLET_FIRST+14", /* 0x02cd */ + "WM_TABLET_FIRST+15", /* 0x02ce */ + "WM_TABLET_FIRST+16", /* 0x02cf */ + "WM_TABLET_FIRST+17", /* 0x02d0 */ + "WM_TABLET_FIRST+18", /* 0x02d1 */ + "WM_TABLET_FIRST+19", /* 0x02d2 */ + "WM_TABLET_FIRST+20", /* 0x02d3 */ + "WM_TABLET_FIRST+21", /* 0x02d4 */ + "WM_TABLET_FIRST+22", /* 0x02d5 */ + "WM_TABLET_FIRST+23", /* 0x02d6 */ + "WM_TABLET_FIRST+24", /* 0x02d7 */ + "WM_TABLET_FIRST+25", /* 0x02d8 */ + "WM_TABLET_FIRST+26", /* 0x02d9 */ + "WM_TABLET_FIRST+27", /* 0x02da */ + "WM_TABLET_FIRST+28", /* 0x02db */ + "WM_TABLET_FIRST+29", /* 0x02dc */ + "WM_TABLET_FIRST+30", /* 0x02dd */ + "WM_TABLET_FIRST+31", /* 0x02de */ + "WM_TABLET_LAST", /* 0x02df */ + + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + "WM_CUT", /* 0x0300 */ + "WM_COPY", + "WM_PASTE", + "WM_CLEAR", + "WM_UNDO", + "WM_RENDERFORMAT", + "WM_RENDERALLFORMATS", + "WM_DESTROYCLIPBOARD", + "WM_DRAWCLIPBOARD", + "WM_PAINTCLIPBOARD", + "WM_VSCROLLCLIPBOARD", + "WM_SIZECLIPBOARD", + "WM_ASKCBFORMATNAME", + "WM_CHANGECBCHAIN", + "WM_HSCROLLCLIPBOARD", + "WM_QUERYNEWPALETTE", /* 0x030f*/ + + "WM_PALETTEISCHANGING", + "WM_PALETTECHANGED", + "WM_HOTKEY", /* 0x0312 */ + "WM_POPUPSYSTEMMENU", /* 0x0313 */ + NULL, NULL, NULL, + "WM_PRINT", /* 0x0317 */ + "WM_PRINTCLIENT", /* 0x0318 */ + "WM_APPCOMMAND", /* 0x0319 */ + "WM_THEMECHANGED", /* 0x031A */ + NULL, NULL, + "WM_CLIPBOARDUPDATE", /* 0x031D */ + "WM_DWMCOMPOSITIONCHANGED", /* 0x031E */ + "WM_DWMNCRENDERINGCHANGED", /* 0x031F */ + + "WM_DWMCOLORIZATIONCOLORCHANGED", /* 0x0320 */ + "WM_DWMWINDOWMAXIMIZEDCHANGE", /* 0x0321 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_GETTITLEBARINFOEX", /* 0x033F */ + + /* 0x0340 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + /* 0x0350 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_HANDHELDFIRST", /* 0x0358 */ + "WM_HANDHELDFIRST+1", /* 0x0359 */ + "WM_HANDHELDFIRST+2", /* 0x035A */ + "WM_HANDHELDFIRST+3", /* 0x035B */ + "WM_HANDHELDFIRST+4", /* 0x035C */ + "WM_HANDHELDFIRST+5", /* 0x035D */ + "WM_HANDHELDFIRST+6", /* 0x035E */ + "WM_HANDHELDLAST", /* 0x035F */ + + "WM_QUERYAFXWNDPROC", /* 0x0360 WM_AFXFIRST */ + "WM_SIZEPARENT", /* 0x0361 */ + "WM_SETMESSAGESTRING", /* 0x0362 */ + "WM_IDLEUPDATECMDUI", /* 0x0363 */ + "WM_INITIALUPDATE", /* 0x0364 */ + "WM_COMMANDHELP", /* 0x0365 */ + "WM_HELPHITTEST", /* 0x0366 */ + "WM_EXITHELPMODE", /* 0x0367 */ + "WM_RECALCPARENT", /* 0x0368 */ + "WM_SIZECHILD", /* 0x0369 */ + "WM_KICKIDLE", /* 0x036A */ + "WM_QUERYCENTERWND", /* 0x036B */ + "WM_DISABLEMODAL", /* 0x036C */ + "WM_FLOATSTATUS", /* 0x036D */ + "WM_ACTIVATETOPLEVEL", /* 0x036E */ + "WM_QUERY3DCONTROLS", /* 0x036F */ + NULL,NULL,NULL, + "WM_SOCKET_NOTIFY", /* 0x0373 */ + "WM_SOCKET_DEAD", /* 0x0374 */ + "WM_POPMESSAGESTRING", /* 0x0375 */ + "WM_OCC_LOADFROMSTREAM", /* 0x0376 */ + "WM_OCC_LOADFROMSTORAGE", /* 0x0377 */ + "WM_OCC_INITNEW", /* 0x0378 */ + "WM_QUEUE_SENTINEL", /* 0x0379 */ + "WM_OCC_LOADFROMSTREAM_EX", /* 0x037A */ + "WM_OCC_LOADFROMSTORAGE_EX", /* 0x037B */ + + NULL,NULL,NULL, + "WM_AFXLAST", /* 0x037F */ + + "WM_PENWINFIRST", /* 0x0380 */ + "WM_RCRESULT", /* 0x0381 */ + "WM_HOOKRCRESULT", /* 0x0382 */ + "WM_GLOBALRCCHANGE", /* 0x0383 */ + "WM_SKB", /* 0x0384 */ + "WM_HEDITCTL", /* 0x0385 */ + NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_PENWINLAST", /* 0x038F */ + + "WM_COALESCE_FIRST", /* 0x0390 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_COALESCE_LAST", /* 0x039F */ + + /* 0x03a0 */ + "MM_JOY1MOVE", + "MM_JOY2MOVE", + "MM_JOY1ZMOVE", + "MM_JOY2ZMOVE", + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x03b0 */ + NULL, NULL, NULL, NULL, NULL, + "MM_JOY1BUTTONDOWN", + "MM_JOY2BUTTONDOWN", + "MM_JOY1BUTTONUP", + "MM_JOY2BUTTONUP", + "MM_MCINOTIFY", + NULL, + "MM_WOM_OPEN", + "MM_WOM_CLOSE", + "MM_WOM_DONE", + "MM_WIM_OPEN", + "MM_WIM_CLOSE", + + /* 0x03c0 */ + "MM_WIM_DATA", + "MM_MIM_OPEN", + "MM_MIM_CLOSE", + "MM_MIM_DATA", + "MM_MIM_LONGDATA", + "MM_MIM_ERROR", + "MM_MIM_LONGERROR", + "MM_MOM_OPEN", + "MM_MOM_CLOSE", + "MM_MOM_DONE", + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* 0x03e0 */ + "WM_DDE_INITIATE", /* 0x3E0 */ + "WM_DDE_TERMINATE", /* 0x3E1 */ + "WM_DDE_ADVISE", /* 0x3E2 */ + "WM_DDE_UNADVISE", /* 0x3E3 */ + "WM_DDE_ACK", /* 0x3E4 */ + "WM_DDE_DATA", /* 0x3E5 */ + "WM_DDE_REQUEST", /* 0x3E6 */ + "WM_DDE_POKE", /* 0x3E7 */ + "WM_DDE_EXECUTE", /* 0x3E8 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + + /* 0x03f0 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + "WM_USER" /* 0x0400 */ +}; + + +#define RESOLVEWM_MAX_LVMMSGNUM 182 +static const char * const LVMMessageTypeNames[RESOLVEWM_MAX_LVMMSGNUM + 1] = +{ + "LVM_GETBKCOLOR", /* 1000 */ + "LVM_SETBKCOLOR", + "LVM_GETIMAGELIST", + "LVM_SETIMAGELIST", + "LVM_GETITEMCOUNT", + "LVM_GETITEMA", + "LVM_SETITEMA", + "LVM_INSERTITEMA", + "LVM_DELETEITEM", + "LVM_DELETEALLITEMS", + "LVM_GETCALLBACKMASK", + "LVM_SETCALLBACKMASK", + "LVM_GETNEXTITEM", + "LVM_FINDITEMA", + "LVM_GETITEMRECT", + "LVM_SETITEMPOSITION", + "LVM_GETITEMPOSITION", + "LVM_GETSTRINGWIDTHA", + "LVM_HITTEST", + "LVM_ENSUREVISIBLE", + "LVM_SCROLL", + "LVM_REDRAWITEMS", + "LVM_ARRANGE", + "LVM_EDITLABELA", + "LVM_GETEDITCONTROL", + "LVM_GETCOLUMNA", + "LVM_SETCOLUMNA", + "LVM_INSERTCOLUMNA", + "LVM_DELETECOLUMN", + "LVM_GETCOLUMNWIDTH", + "LVM_SETCOLUMNWIDTH", + "LVM_GETHEADER", + NULL, + "LVM_CREATEDRAGIMAGE", + "LVM_GETVIEWRECT", + "LVM_GETTEXTCOLOR", + "LVM_SETTEXTCOLOR", + "LVM_GETTEXTBKCOLOR", + "LVM_SETTEXTBKCOLOR", + "LVM_GETTOPINDEX", + "LVM_GETCOUNTPERPAGE", + "LVM_GETORIGIN", + "LVM_UPDATE", + "LVM_SETITEMSTATE", + "LVM_GETITEMSTATE", + "LVM_GETITEMTEXTA", + "LVM_SETITEMTEXTA", + "LVM_SETITEMCOUNT", + "LVM_SORTITEMS", + "LVM_SETITEMPOSITION32", + "LVM_GETSELECTEDCOUNT", + "LVM_GETITEMSPACING", + "LVM_GETISEARCHSTRINGA", + "LVM_SETICONSPACING", + "LVM_SETEXTENDEDLISTVIEWSTYLE", + "LVM_GETEXTENDEDLISTVIEWSTYLE", + "LVM_GETSUBITEMRECT", + "LVM_SUBITEMHITTEST", + "LVM_SETCOLUMNORDERARRAY", + "LVM_GETCOLUMNORDERARRAY", + "LVM_SETHOTITEM", + "LVM_GETHOTITEM", + "LVM_SETHOTCURSOR", + "LVM_GETHOTCURSOR", + "LVM_APPROXIMATEVIEWRECT", + "LVM_SETWORKAREAS", + "LVM_GETSELECTIONMARK", + "LVM_SETSELECTIONMARK", + "LVM_SETBKIMAGEA", + "LVM_GETBKIMAGEA", + "LVM_GETWORKAREAS", + "LVM_SETHOVERTIME", + "LVM_GETHOVERTIME", + "LVM_GETNUMBEROFWORKAREAS", + "LVM_SETTOOLTIPS", + "LVM_GETITEMW", + "LVM_SETITEMW", + "LVM_INSERTITEMW", + "LVM_GETTOOLTIPS", + NULL, + NULL, + NULL, + NULL, + "LVM_FINDITEMW", + NULL, + NULL, + NULL, + "LVM_GETSTRINGWIDTHW", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "LVM_GETCOLUMNW", + "LVM_SETCOLUMNW", + "LVM_INSERTCOLUMNW", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "LVM_GETITEMTEXTW", + "LVM_SETITEMTEXTW", + "LVM_GETISEARCHSTRINGW", + "LVM_EDITLABELW", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "LVM_SETBKIMAGEW", + "LVM_GETBKIMAGEW", /* 0x108B */ + "LVM_SETSELECTEDCOLUMN", + "LVM_SETTILEWIDTH", + "LVM_SETVIEW", + "LVM_GETVIEW", + NULL, + "LVM_INSERTGROUP", + NULL, + "LVM_SETGROUPINFO", + NULL, + "LVM_GETGROUPINFO", + "LVM_REMOVEGROUP", + "LVM_MOVEGROUP", + NULL, + NULL, + "LVM_MOVEITEMTOGROUP", + "LVM_SETGROUPMETRICS", + "LVM_GETGROUPMETRICS", + "LVM_ENABLEGROUPVIEW", + "LVM_SORTGROUPS", + "LVM_INSERTGROUPSORTED", + "LVM_REMOVEALLGROUPS", + "LVM_HASGROUP", + "LVM_SETTILEVIEWINFO", + "LVM_GETTILEVIEWINFO", + "LVM_SETTILEINFO", + "LVM_GETTILEINFO", + "LVM_SETINSERTMARK", + "LVM_GETINSERTMARK", + "LVM_INSERTMARKHITTEST", + "LVM_GETINSERTMARKRECT", + "LVM_SETINSERTMARKCOLOR", + "LVM_GETINSERTMARKCOLOR", + NULL, + "LVM_SETINFOTIP", + "LVM_GETSELECTEDCOLUMN", + "LVM_ISGROUPVIEWENABLED", + "LVM_GETOUTLINECOLOR", + "LVM_SETOUTLINECOLOR", + NULL, + "LVM_CANCELEDITLABEL", + "LVM_MAPINDEXTOID", + "LVM_MAPIDTOINDEX", + "LVM_ISITEMVISIBLE" +}; + + +#define RESOLVEWM_MAX_TVMSGNUM 65 +static const char * const TVMessageTypeNames[RESOLVEWM_MAX_TVMSGNUM + 1] = +{ + "TVM_INSERTITEMA", /* 1100 */ + "TVM_DELETEITEM", + "TVM_EXPAND", + NULL, + "TVM_GETITEMRECT", + "TVM_GETCOUNT", + "TVM_GETINDENT", + "TVM_SETINDENT", + "TVM_GETIMAGELIST", + "TVM_SETIMAGELIST", + "TVM_GETNEXTITEM", + "TVM_SELECTITEM", + "TVM_GETITEMA", + "TVM_SETITEMA", + "TVM_EDITLABELA", + "TVM_GETEDITCONTROL", + "TVM_GETVISIBLECOUNT", + "TVM_HITTEST", + "TVM_CREATEDRAGIMAGE", + "TVM_SORTCHILDREN", + "TVM_ENSUREVISIBLE", + "TVM_SORTCHILDRENCB", + "TVM_ENDEDITLABELNOW", + "TVM_GETISEARCHSTRINGA", + "TVM_SETTOOLTIPS", + "TVM_GETTOOLTIPS", + "TVM_SETINSERTMARK", + "TVM_SETITEMHEIGHT", + "TVM_GETITEMHEIGHT", + "TVM_SETBKCOLOR", + "TVM_SETTEXTCOLOR", + "TVM_GETBKCOLOR", + "TVM_GETTEXTCOLOR", + "TVM_SETSCROLLTIME", + "TVM_GETSCROLLTIME", + "TVM_UNKNOWN35", + "TVM_UNKNOWN36", + "TVM_SETINSERTMARKCOLOR", + "TVM_GETINSERTMARKCOLOR", + "TVM_GETITEMSTATE", + "TVM_SETLINECOLOR", + "TVM_GETLINECOLOR", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "TVM_INSERTITEMW", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "TVM_GETITEMW", + "TVM_SETITEMW", + "TVM_GETISEARCHSTRINGW", + "TVM_EDITLABELW" +}; + + +#define RESOLVEWM_MAX_HDMMSGNUM 19 +static const char * const HDMMessageTypeNames[RESOLVEWM_MAX_HDMMSGNUM + 1] = +{ + "HDM_GETITEMCOUNT", /* 1200 */ + "HDM_INSERTITEMA", + "HDM_DELETEITEM", + "HDM_GETITEMA", + "HDM_SETITEMA", + "HDM_LAYOUT", + "HDM_HITTEST", + "HDM_GETITEMRECT", + "HDM_SETIMAGELIST", + "HDM_GETIMAGELIST", + "HDM_INSERTITEMW", + "HDM_GETITEMW", + "HDM_SETITEMW", + NULL, + NULL, + "HDM_ORDERTOINDEX", + "HDM_CREATEDRAGIMAGE", + "GETORDERARRAYINDEX", + "SETORDERARRAYINDEX", + "SETHOTDIVIDER" +}; + + +#define RESOLVEWM_MAX_TCMMSGNUM 62 +static const char * const TCMMessageTypeNames[RESOLVEWM_MAX_TCMMSGNUM + 1] = +{ + NULL, /* 1300 */ + NULL, + "TCM_SETIMAGELIST", + "TCM_GETIMAGELIST", + "TCM_GETITEMCOUNT", + "TCM_GETITEMA", + "TCM_SETITEMA", + "TCM_INSERTITEMA", + "TCM_DELETEITEM", + "TCM_DELETEALLITEMS", + "TCM_GETITEMRECT", + "TCM_GETCURSEL", + "TCM_SETCURSEL", + "TCM_HITTEST", + "TCM_SETITEMEXTRA", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "TCM_ADJUSTRECT", + "TCM_SETITEMSIZE", + "TCM_REMOVEIMAGE", + "TCM_SETPADDING", + "TCM_GETROWCOUNT", + "TCM_GETTOOLTIPS", + "TCM_SETTOOLTIPS", + "TCM_GETCURFOCUS", + "TCM_SETCURFOCUS", + "TCM_SETMINTABWIDTH", + "TCM_DESELECTALL", + "TCM_HIGHLIGHTITEM", + "TCM_SETEXTENDEDSTYLE", + "TCM_GETEXTENDEDSTYLE", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "TCM_GETITEMW", + "TCM_SETITEMW", + "TCM_INSERTITEMW" +}; + +#define RESOLVEWM_MAX_PGMMSGNUM 13 +static const char * const PGMMessageTypeNames[RESOLVEWM_MAX_PGMMSGNUM + 1] = +{ + NULL, /* 1400 */ + "PGM_SETCHILD", + "PGM_RECALCSIZE", + "PGM_FORWARDMOUSE", + "PGM_SETBKCOLOR", + "PGM_GETBKCOLOR", + "PGM_SETBORDER", + "PGM_GETBORDER", + "PGM_SETPOS", + "PGM_GETPOS", + "PGM_SETBUTTONSIZE", + "PGM_GETBUTTONSIZE", + "PGM_GETBUTTONSTATE", + "PGM_GETDROPTARGET" +}; + + +#define RESOLVEWM_MAX_CCMMSGNUM 9 +static const char * const CCMMessageTypeNames[RESOLVEWM_MAX_CCMMSGNUM + 1] = +{ + NULL, /* 0x2000 */ + "CCM_SETBKCOLOR", + "CCM_SETCOLORSCHEME", + "CCM_GETCOLORSCHEME", + "CCM_GETDROPTARGET", + "CCM_SETUNICODEFORMAT", + "CCM_GETUNICODEFORMAT", + "CCM_SETVERSION", + "CCM_GETVERSION", + "CCM_SETNOTIFYWINDOW" +}; + + +/* + * Returns a string representation of the specfied message or NULL + */ +static const char * ResolveWindowMessage(UINT msg) +{ + if (msg <= RESOLVEWM_MAX_MSGNUM) + return MessageTypeNames[msg]; + + if (msg >= LVM_FIRST && msg <= LVM_FIRST + RESOLVEWM_MAX_LVMMSGNUM) + return LVMMessageTypeNames[msg-LVM_FIRST]; + + if (msg >= TV_FIRST && msg <= TV_FIRST + RESOLVEWM_MAX_TVMSGNUM) + return TVMessageTypeNames[msg-TV_FIRST]; + + if (msg >= HDM_FIRST && msg <= HDM_FIRST + RESOLVEWM_MAX_HDMMSGNUM) + return HDMMessageTypeNames[msg-HDM_FIRST]; + + if (msg >= TCM_FIRST && msg <= TCM_FIRST + RESOLVEWM_MAX_TCMMSGNUM) + return TCMMessageTypeNames[msg-TCM_FIRST]; + + if (msg >= PGM_FIRST && msg <= PGM_FIRST + RESOLVEWM_MAX_PGMMSGNUM) + return PGMMessageTypeNames[msg-PGM_FIRST]; + + if (msg >= CCM_FIRST && msg <= CCM_FIRST + RESOLVEWM_MAX_CCMMSGNUM) + return CCMMessageTypeNames[msg-CCM_FIRST]; + + return NULL; +} + + +#endif /* __WINE_WINE_RESOLVEWM_H */
--- include/wine/resolvewm.h | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/include/wine/resolvewm.h b/include/wine/resolvewm.h index 573f9ee..d870f12 100644 --- a/include/wine/resolvewm.h +++ b/include/wine/resolvewm.h @@ -23,6 +23,8 @@ #ifndef __WINE_WINE_RESOLVEWM_H #define __WINE_WINE_RESOLVEWM_H
+#include <stdio.h> + #define RESOLVEWM_MAX_MSGNUM WM_USER
static const char * const MessageTypeNames[RESOLVEWM_MAX_MSGNUM + 1] = @@ -1116,4 +1118,31 @@ static const char * ResolveWindowMessage(UINT msg) }
+#define BUFFER_COUNT 2 /* Two buffers so that cases where two messages get compared are handles properly*/ +#define BUFFER_SIZE 20 /* 8 digits for "WM_USER+" + 11 digits for integer + 1 digit for termination 0 */ +/* + * Returns a string representation of the given windows message. + * The returned string will be valid for some time, but not indefinitely as strings are re-used. + */ +static const char * WMToString(UINT msg) +{ + static int current_buffer = 0; + static char buffers[BUFFER_SIZE][BUFFER_COUNT]; + const char * str = ResolveWindowMessage(msg); + char * buffer; + if (!str) + { + buffer = buffers[current_buffer]; + if (msg >= WM_USER && msg <= WM_APP) + sprintf(buffer, "WM_USER+%d", msg - WM_USER); + else + sprintf(buffer, "%04x", msg); + str = buffer; + current_buffer = (current_buffer + 1) % BUFFER_COUNT; + } + return str; +} +#undef BUFFER_COUNT +#undef BUFFER_SIZE + #endif /* __WINE_WINE_RESOLVEWM_H */
--- dlls/comctl32/animate.c | 3 ++- dlls/comctl32/comboex.c | 11 ++++++----- dlls/comctl32/header.c | 3 ++- dlls/comctl32/hotkey.c | 3 ++- dlls/comctl32/ipaddress.c | 5 +++-- dlls/comctl32/listview.c | 7 ++++--- dlls/comctl32/monthcal.c | 7 ++++--- dlls/comctl32/nativefont.c | 5 +++-- dlls/comctl32/progress.c | 3 ++- dlls/comctl32/propsheet.c | 5 +++-- dlls/comctl32/rebar.c | 5 +++-- dlls/comctl32/status.c | 3 ++- dlls/comctl32/syslink.c | 3 ++- dlls/comctl32/tab.c | 3 ++- dlls/comctl32/toolbar.c | 5 +++-- dlls/comctl32/tooltips.c | 3 ++- dlls/comctl32/trackbar.c | 3 ++- dlls/comctl32/updown.c | 9 +++++---- 18 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index a86ff85..34abff0 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -45,6 +45,7 @@ #include "mmsystem.h" #include "comctl32.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(animate);
@@ -885,7 +886,7 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP { ANIMATE_INFO *infoPtr = (ANIMATE_INFO *)GetWindowLongPtrW(hWnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hWnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", hWnd, WMToString(uMsg), wParam, lParam); if (!infoPtr && (uMsg != WM_NCCREATE)) return DefWindowProcW(hWnd, uMsg, wParam, lParam); switch (uMsg) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 6e90751..4a490ff 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -41,6 +41,7 @@ #include "comctl32.h" #include "wine/debug.h" #include "wine/unicode.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(comboex);
@@ -1719,8 +1720,8 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, RECT rect; LRESULT lret;
- TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n", - hwnd, uMsg, wParam, lParam, infoPtr); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx, info_ptr=%p\n", + hwnd, WMToString(uMsg), wParam, lParam, infoPtr);
if (!infoPtr) return 0;
@@ -1913,8 +1914,8 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, POINT pt; WCHAR edit_text[260];
- TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n", - hwnd, uMsg, wParam, lParam, infoPtr); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx, info_ptr=%p\n", + hwnd, WMToString(uMsg), wParam, lParam, infoPtr);
if (!infoPtr) return 0;
@@ -2145,7 +2146,7 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr) { if (uMsg == WM_CREATE) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 603d0a3..eff0564 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -43,6 +43,7 @@ #include "tmschema.h" #include "uxtheme.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(header);
@@ -2024,7 +2025,7 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { HEADER_INFO *infoPtr = (HEADER_INFO *)GetWindowLongPtrW(hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, msg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx\n", hwnd, WMToString(msg), wParam, lParam); if (!infoPtr && (msg != WM_CREATE)) return DefWindowProcW (hwnd, msg, wParam, lParam); switch (msg) { diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index a72b487..f066cc6 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -38,6 +38,7 @@ #include "commctrl.h" #include "comctl32.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(hotkey);
@@ -465,7 +466,7 @@ static LRESULT WINAPI HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { HOTKEY_INFO *infoPtr = (HOTKEY_INFO *)GetWindowLongPtrW (hwnd, 0); - TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam); if (!infoPtr && (uMsg != WM_NCCREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam); switch (uMsg) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 03b8d1c..9e23cb2 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -47,6 +47,7 @@ #include "comctl32.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(ipaddress);
@@ -484,7 +485,7 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) INT index, len = 0, startsel, endsel; IPPART_INFO *part;
- TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam); + TRACE("(hwnd=%p msg=%s wparam=0x%lx lparam=0x%lx)\n", hwnd, WMToString(uMsg), wParam, lParam);
if ( (index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0) return 0; part = &infoPtr->Part[index]; @@ -563,7 +564,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { IPADDRESS_INFO *infoPtr = (IPADDRESS_INFO *)GetWindowLongPtrW (hwnd, 0);
- TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam); + TRACE("(hwnd=%p msg=%s wparam=0x%lx lparam=0x%lx)\n", hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ae8736a..ed1001b 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -165,6 +165,7 @@
#include "wine/debug.h" #include "wine/unicode.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(listview);
@@ -5749,8 +5750,8 @@ static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(GetParent(hwnd), 0); BOOL save = TRUE;
- TRACE("(hwnd=%p, uMsg=%x, wParam=%lx, lParam=%lx, isW=%d)\n", - hwnd, uMsg, wParam, lParam, isW); + TRACE("(hwnd=%p, uMsg=%s, wParam=%lx, lParam=%lx, isW=%d)\n", + hwnd, WMToString(uMsg), wParam, lParam, isW);
switch (uMsg) { @@ -11021,7 +11022,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
- TRACE("(hwnd=%p uMsg=%x wParam=%lx lParam=%lx)\n", hwnd, uMsg, wParam, lParam); + TRACE("(hwnd=%p uMsg=%s wParam=%lx lParam=%lx)\n", hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_NCCREATE)) return DefWindowProcW(hwnd, uMsg, wParam, lParam); diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 1cc64db..1c88e37 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -57,6 +57,7 @@ #include "tmschema.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(monthcal);
@@ -1878,8 +1879,8 @@ static LRESULT CALLBACK EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM { MONTHCAL_INFO *infoPtr = (MONTHCAL_INFO *)GetWindowLongPtrW(GetParent(hwnd), 0);
- TRACE("(hwnd=%p, uMsg=%x, wParam=%lx, lParam=%lx)\n", - hwnd, uMsg, wParam, lParam); + TRACE("(hwnd=%p, msg=%s, wParam=%lx, lParam=%lx)\n", + hwnd, WMToString(uMsg), wParam, lParam);
switch (uMsg) { @@ -2616,7 +2617,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { MONTHCAL_INFO *infoPtr = (MONTHCAL_INFO *)GetWindowLongPtrW(hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW(hwnd, uMsg, wParam, lParam); diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c index 2e11a9e..d2bf357 100644 --- a/dlls/comctl32/nativefont.c +++ b/dlls/comctl32/nativefont.c @@ -36,6 +36,7 @@ #include "commctrl.h" #include "comctl32.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(nativefont);
@@ -76,8 +77,8 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr(hwnd);
- TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n", - hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%08lx lparam=%08lx\n", + hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW( hwnd, uMsg, wParam, lParam ); diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index c44b816..df0e793 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -51,6 +51,7 @@ #include "uxtheme.h" #include "tmschema.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(progress);
@@ -539,7 +540,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, static const WCHAR themeClass[] = {'P','r','o','g','r','e','s','s',0}; HTHEME theme;
- TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx\n", hwnd, WMToString(message), wParam, lParam);
infoPtr = (PROGRESS_INFO *)GetWindowLongPtrW(hwnd, 0);
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 3e313ba..e2c9613 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -68,6 +68,7 @@ #include "uxtheme.h"
#include "wine/debug.h" +#include "wine/resolvewm.h" #include "wine/unicode.h"
/****************************************************************************** @@ -3384,8 +3385,8 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) static INT_PTR CALLBACK PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - TRACE("hwnd=%p msg=0x%04x wparam=%lx lparam=%lx\n", - hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", + hwnd, WMToString(uMsg), wParam, lParam);
switch (uMsg) { diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 8ecfee3..a60a0af 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -94,6 +94,7 @@ #include "uxtheme.h" #include "tmschema.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(rebar);
@@ -3478,8 +3479,8 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", - hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", + hwnd, WMToString(uMsg), wParam, lParam); if (!infoPtr && (uMsg != WM_NCCREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam); switch (uMsg) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 1b69ef2..824f70a 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -54,6 +54,7 @@ #include "uxtheme.h" #include "tmschema.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(statusbar);
@@ -1193,7 +1194,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) INT nPart = ((INT) wParam) & 0x00ff; LRESULT res;
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, msg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", hwnd, WMToString(msg), wParam, lParam); if (!infoPtr && msg != WM_CREATE) return DefWindowProcW (hwnd, msg, wParam, lParam);
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 9340fc6..55bce51 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -38,6 +38,7 @@ #include "comctl32.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(syslink);
@@ -1559,7 +1560,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, { SYSLINK_INFO *infoPtr;
- TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx\n", hwnd, WMToString(message), wParam, lParam);
infoPtr = (SYSLINK_INFO *)GetWindowLongPtrW(hwnd, 0);
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 8807a11..ff0f06d 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -66,6 +66,7 @@ #include "tmschema.h" #include "wine/debug.h" #include <math.h> +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(tab);
@@ -3333,7 +3334,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
- TRACE("hwnd=%p msg=%x wParam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wParam=%lx lParam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam); if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam);
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 9b41732..b9a0945 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -83,6 +83,7 @@ #include "uxtheme.h" #include "tmschema.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(toolbar);
@@ -6400,8 +6401,8 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = (TOOLBAR_INFO *)GetWindowLongPtrW(hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", - hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", + hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_NCCREATE)) return DefWindowProcW( hwnd, uMsg, wParam, lParam ); diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 688d3b5..1c9f877 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -103,6 +103,7 @@ #include "commctrl.h" #include "comctl32.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(tooltips);
@@ -2158,7 +2159,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lParam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam); if (!infoPtr && (uMsg != WM_CREATE) && (uMsg != WM_NCCREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam); switch (uMsg) diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index c924b53..340c7ab 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -44,6 +44,7 @@ #include "uxtheme.h" #include "tmschema.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
#include "comctl32.h"
@@ -1736,7 +1737,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TRACKBAR_INFO *infoPtr = (TRACKBAR_INFO *)GetWindowLongPtrW (hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%lx lparam=%lx\n", hwnd, WMToString(uMsg), wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW (hwnd, uMsg, wParam, lParam); diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 75653e1..a13b1e2 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -44,6 +44,7 @@ #include "tmschema.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/resolvewm.h"
WINE_DEFAULT_DEBUG_CHANNEL(updown);
@@ -530,8 +531,8 @@ UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, { UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr((HWND)ref_data);
- TRACE("hwnd=%p, uMsg=%04x, wParam=%08lx, lParam=%08lx\n", - hwnd, uMsg, wParam, lParam); + TRACE("hwnd=%p, msg=%s, wParam=%08lx, lParam=%08lx\n", + hwnd, WMToString(uMsg), wParam, lParam);
switch(uMsg) { @@ -826,7 +827,7 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT break;
default: - ERR("Impossible case (msg=%x)!\n", msg); + ERR("Impossible case (msg=%s)!\n", WMToString(msg)); }
} @@ -840,7 +841,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L static const WCHAR themeClass[] = {'S','p','i','n',0}; HTHEME theme;
- TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n", hwnd, message, wParam, lParam); + TRACE("hwnd=%p msg=%s wparam=%08lx lparam=%08lx\n", hwnd, WMToString(message), wParam, lParam);
if (!infoPtr && (message != WM_CREATE)) return DefWindowProcW (hwnd, message, wParam, lParam);
--- dlls/comctl32/tests/datetime.c | 3 +- dlls/comctl32/tests/header.c | 5 ++- dlls/comctl32/tests/listview.c | 7 ++-- dlls/comctl32/tests/monthcal.c | 3 +- dlls/comctl32/tests/msg.h | 71 ++++++++++++++++++++------------------- dlls/comctl32/tests/tab.c | 5 ++- dlls/comctl32/tests/toolbar.c | 3 +- dlls/comctl32/tests/trackbar.c | 5 ++- dlls/comctl32/tests/treeview.c | 3 +- dlls/comctl32/tests/updown.c | 7 ++-- 10 files changed, 61 insertions(+), 51 deletions(-)
diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c index 8b902ba..1e6ddab 100644 --- a/dlls/comctl32/tests/datetime.c +++ b/dlls/comctl32/tests/datetime.c @@ -21,6 +21,7 @@ #include <commctrl.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "msg.h"
#define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT)) @@ -128,7 +129,7 @@ static LRESULT WINAPI datetime_subclass_proc(HWND hwnd, UINT message, WPARAM wPa LRESULT ret; struct message msg;
- trace("datetime: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("datetime: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index d9b4a73..d6167a9 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -24,6 +24,7 @@ #include <assert.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "v6util.h" #include "msg.h"
@@ -403,7 +404,7 @@ static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wPara LRESULT ret; struct message msg;
- trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("header: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam); msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -434,7 +435,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_DEVICECHANGE)
{ - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 6ef82bb..4f2b735 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -25,6 +25,7 @@ #include <commctrl.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "v6util.h" #include "msg.h"
@@ -324,7 +325,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
add_message(sequences, PARENT_SEQ_INDEX, &msg); add_message(sequences, COMBINED_SEQ_INDEX, &msg); @@ -465,7 +466,7 @@ static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wPa LRESULT ret; struct message msg;
- trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("listview: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
/* some debug output for style changing */ if ((message == WM_STYLECHANGING || @@ -543,7 +544,7 @@ static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wPara LRESULT ret; struct message msg;
- trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("header: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 52e16c3..86cd7db 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -28,6 +28,7 @@ #include "commctrl.h"
#include "wine/test.h" +#include "wine/resolvewm.h" #include "v6util.h" #include <assert.h> #include <windows.h> @@ -456,7 +457,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 361ccdb..7e59664 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -21,6 +21,7 @@ #include <assert.h> #include <windows.h> #include "wine/test.h" +#include "wine/resolvewm.h"
/* undocumented SWP flags - from SDK 3.1 */ #define SWP_NOCLIENTSIZE 0x0800 @@ -121,7 +122,7 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
while (expected->message && actual->message) { - trace_( file, line)("expected %04x - actual %04x\n", expected->message, actual->message); + trace_( file, line)("expected %s - actual %s\n", WMToString(expected->message), WMToString(actual->message));
if (expected->message == actual->message) { @@ -133,15 +134,15 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); + "%s: in msg %s expecting wParam 0x%lx got 0x%lx\n", + context, WMToString(expected->message), expected->wParam, actual->wParam); } } else { ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); + "%s: in msg %s expecting wParam 0x%lx got 0x%lx\n", + context, WMToString(expected->message), expected->wParam, actual->wParam); } }
@@ -153,15 +154,15 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); + "%s: in msg %s expecting lParam 0x%lx got 0x%lx\n", + context, WMToString(expected->message), expected->lParam, actual->lParam); } } else { ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); + "%s: in msg %s expecting lParam 0x%lx got 0x%lx\n", + context, WMToString(expected->message), expected->lParam, actual->lParam); } }
@@ -178,15 +179,15 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); + "%s: in msg %s expecting id 0x%x got 0x%x\n", + context, WMToString(expected->message), expected->id, actual->id); } } else { ok_(file, line) (expected->id == actual->id, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); + "%s: in msg %s expecting id 0x%x got 0x%x\n", + context, WMToString(expected->message), expected->id, actual->id); } }
@@ -196,32 +197,32 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); + "%s: the msg %s should %shave been sent by DefWindowProc\n", + context, WMToString(expected->message), (expected->flags & defwinproc) ? "" : "NOT "); } } else { ok_(file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc), - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); + "%s: the msg %s should %shave been sent by DefWindowProc\n", + context, WMToString(expected->message), (expected->flags & defwinproc) ? "" : "NOT "); }
ok_(file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint), - "%s: the msg 0x%04x should %shave been sent by BeginPaint\n", - context, expected->message, (expected->flags & beginpaint) ? "" : "NOT "); + "%s: the msg %s should %shave been sent by BeginPaint\n", + context, WMToString(expected->message), (expected->flags & beginpaint) ? "" : "NOT "); ok_(file, line) ((expected->flags & (sent|posted)) == (actual->flags & (sent|posted)), - "%s: the msg 0x%04x should have been %s\n", - context, expected->message, (expected->flags & posted) ? "posted" : "sent"); + "%s: the msg %s should have been %s\n", + context, WMToString(expected->message), (expected->flags & posted) ? "posted" : "sent"); ok_(file, line) ((expected->flags & parent) == (actual->flags & parent), - "%s: the msg 0x%04x was expected in %s\n", - context, expected->message, (expected->flags & parent) ? "parent" : "child"); + "%s: the msg %s was expected in %s\n", + context, WMToString(expected->message), (expected->flags & parent) ? "parent" : "child"); ok_(file, line) ((expected->flags & hook) == (actual->flags & hook), - "%s: the msg 0x%04x should have been sent by a hook\n", - context, expected->message); + "%s: the msg %s should have been sent by a hook\n", + context, WMToString(expected->message)); ok_(file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook), - "%s: the msg 0x%04x should have been sent by a winevent hook\n", - context, expected->message); + "%s: the msg %s should have been sent by a winevent hook\n", + context, WMToString(expected->message)); expected++; actual++; } @@ -232,8 +233,8 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; todo_wine { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); + ok_(file, line) (FALSE, "%s: the msg %s was expected, but got msg %s instead\n", + context, WMToString(expected->message), WMToString(actual->message)); }
flush_sequence(seq, sequence_index); @@ -241,8 +242,8 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, } else { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); + ok_(file, line) (FALSE, "%s: the msg %s was expected, but got msg %s instead\n", + context, WMToString(expected->message), WMToString(actual->message)); expected++; actual++; } @@ -259,15 +260,15 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, if (expected->message || actual->message) { failcount++; - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); + ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %s - actual %s\n", + context, WMToString(expected->message), WMToString(actual->message)); } } } else if (expected->message || actual->message) { - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); + ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %s - actual %s\n", + context, WMToString(expected->message), WMToString(actual->message)); }
if(todo && !failcount) /* succeeded yet marked todo */ diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index 6774d51..2a630d5 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -24,6 +24,7 @@ #include <stdio.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "msg.h"
#define DEFAULT_MIN_TAB_WIDTH 54 @@ -327,7 +328,7 @@ static LRESULT WINAPI parentWindowProcess(HWND hwnd, UINT message, WPARAM wParam message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; @@ -390,7 +391,7 @@ static LRESULT WINAPI tabSubclassProcess(HWND hwnd, UINT message, WPARAM wParam, message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("tab: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("tab: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 8311df5..e8e09ce 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -32,6 +32,7 @@ #include "resources.h"
#include "wine/test.h" +#include "wine/resolvewm.h"
#include "msg.h"
@@ -138,7 +139,7 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hWnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hWnd, WMToString(message), wParam, lParam); add_message(sequences, PARENT_SEQ_INDEX, &msg); }
diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index 68261d8..53891cd 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -23,6 +23,7 @@ #include <stdio.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "msg.h"
#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) @@ -379,7 +380,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; @@ -430,7 +431,7 @@ static LRESULT WINAPI trackbar_subclass_proc(HWND hwnd, UINT message, WPARAM wPa LRESULT ret; struct message msg;
- trace("trackbar: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("trackbar: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 5464975..d01394f 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -30,6 +30,7 @@ #include "commctrl.h"
#include "wine/test.h" +#include "wine/resolvewm.h" #include "v6util.h" #include "msg.h"
@@ -856,7 +857,7 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hWnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hWnd, WMToString(message), wParam, lParam); add_message(sequences, PARENT_SEQ_INDEX, &msg); }
diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 859b3a0..720db03 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -50,6 +50,7 @@ #include <stdio.h>
#include "wine/test.h" +#include "wine/resolvewm.h" #include "msg.h"
#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) @@ -180,7 +181,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_GETICON && message != WM_DEVICECHANGE) { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("parent: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; @@ -234,7 +235,7 @@ static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LRESULT ret; struct message msg;
- trace("edit: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("edit: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam; @@ -276,7 +277,7 @@ static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wPara LRESULT ret; struct message msg;
- trace("updown: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + trace("updown: %p, %s, %08lx, %08lx\n", hwnd, WMToString(message), wParam, lParam);
msg.message = message; msg.flags = sent|wparam|lparam;
2010/9/7 Mariusz Pluciński vshader@gmail.com
In my opinion it would be good to make it available in similar way, as functions like debugstr_guid, which are defined in include/wine/debug.h
Messages' names are declared as an array MessageTypeNames in spy.c . Maybe it would be enough to copy it into the header and wrap access to it into simple function like debugstr_msg()? This is easiest way, but in the result there will be copy of array in each .so library. There will be also problem with multiple reference, but this may be solved following solution used in test.h.
Storing the string table in libwine.so would avoid having a copy of the
array in each .so library that uses it.
On 09/11/2010 11:34 PM, Dylan Smith wrote:
2010/9/7 Mariusz Pluciński <vshader@gmail.com mailto:vshader@gmail.com>
In my opinion it would be good to make it available in similar way, as functions like debugstr_guid, which are defined in include/wine/debug.h Messages' names are declared as an array MessageTypeNames in spy.c . Maybe it would be enough to copy it into the header and wrap access to it into simple function like debugstr_msg()? This is easiest way, but in the result there will be copy of array in each .so library. There will be also problem with multiple reference, but this may be solved following solution used in test.h.
Storing the string table in libwine.so would avoid having a copy of the array in each .so library that uses it.
Can stuff in libwine be used by tests? Does libwine get linked into cross test executables?
On Sun, Sep 12, 2010 at 10:38:09AM +0200, Florian Köberle wrote:
On 09/11/2010 11:34 PM, Dylan Smith wrote:
2010/9/7 Mariusz Pluciński <vshader@gmail.com mailto:vshader@gmail.com>
In my opinion it would be good to make it available in similar way, as functions like debugstr_guid, which are defined in include/wine/debug.h Messages' names are declared as an array MessageTypeNames in spy.c . Maybe it would be enough to copy it into the header and wrap access to it into simple function like debugstr_msg()? This is easiest way, but in the result there will be copy of array in each .so library. There will be also problem with multiple reference, but this may be solved following solution used in test.h.
Storing the string table in libwine.so would avoid having a copy of the array in each .so library that uses it.
Can stuff in libwine be used by tests? Does libwine get linked into cross test executables?
I do not think so, for both.
I also think Alexandres take on such "more debugging" things was more towards a postprocessing script that annotates the debugging output (like a small perl script), but I am leaving that for him to comment ;)
Ciao, Marcus