获取Windows消息名称(含VCL消息)-1
http://blog.csdn.net/DavidHsing/archive/2009/02/25/3935332.aspx
MessageTypeNames 部分定义根据winuser.h和网上搜集而来。
static const char * const MessageTypeNames[WM_USER + 1] =
{
"WM_NULL",//0x0000
"WM_CREATE",//0x0001
"WM_DESTROY",//0x0002
"WM_MOVE",//0x0003
"WM_SIZEWAIT",//0x0004
"WM_SIZE",//0x0005
"WM_ACTIVATE",//0x0006
"WM_SETFOCUS",//0x0007
"WM_KILLFOCUS",//0x0008
"WM_SETVISIBLE",//0x0009
"WM_ENABLE",//0x000a
"WM_SETREDRAW",//0x000b
"WM_SETTEXT",//0x000c
"WM_GETTEXT",//0x000d
"WM_GETTEXTLENGTH",//0x000e
"WM_PAINT",//0x000f
"WM_CLOSE", /* 0x10 */
"WM_QUERYENDSESSION",//0x0011
"WM_QUIT",//0x0012
"WM_QUERYOPEN",//0x0013
"WM_ERASEBKGND",//0x0014
"WM_SYSCOLORCHANGE",//0x0015
"WM_ENDSESSION",//0x0016
"WM_SYSTEMERROR",//0x0017
"WM_SHOWWINDOW",//0x0018
"WM_CTLCOLOR",//0x0019
"WM_WININICHANGE",//0x001a
"WM_DEVMODECHANGE",//0x001b
"WM_ACTIVATEAPP",//0x001c
"WM_FONTCHANGE",//0x001d
"WM_TIMECHANGE",//0x001e
"WM_CANCELMODE",//0x001f
"WM_SETCURSOR", /* 0x20 */
"WM_MOUSEACTIVATE",//0x0021
"WM_CHILDACTIVATE",//0x0022
"WM_QUEUESYNC",//0x0023
"WM_GETMINMAXINFO",//0x0024
"WM_LOGOFF",//0x0025
"WM_PAINTICON",//0x0026
"WM_ICONERASEBKGND",//0x0027
"WM_NEXTDLGCTL",//0x0028
"WM_ALTTABACTIVE",//0x0029
"WM_SPOOLERSTATUS",//0x002a
"WM_DRAWITEM",//0x002b
"WM_MEASUREITEM",//0x002c
"WM_DELETEITEM",//0x002d
"WM_VKEYTOITEM",//0x002e
"WM_CHARTOITEM",//0x002f
"WM_SETFONT", /* 0x30 */
"WM_GETFONT",//0x0031
"WM_SETHOTKEY",//0x0032
"WM_GETHOTKEY",//0x0033
"WM_FILESYSCHANGE",//0x0034
"WM_ISACTIVEICON",//0x0035
"WM_QUERYPARKICON",//0x0036
"WM_QUERYDRAGICON",//0x0037
"WM_WINHELP",//0x0038
"WM_COMPAREITEM",//0x0039
"WM_FULLSCREEN",//0x003a
"WM_CLIENTSHUTDOWN",//0x003b
"WM_DDEMLEVENT",//0x003c
"WM_GETOBJECT",//0x003d
NULL,//0x003e
"WM_CALCSCROLL",//0x003f
"WM_TESTING", /* 0x40 */
"WM_COMPACTING",//0x0041
"WM_OTHERWINDOWCREATED",//0x0042
"WM_OTHERWINDOWDESTROYED",//0x0043
"WM_COMMNOTIFY",//0x0044
"WM_MEDIASTATUSCHANGE",//0x0045
"WM_WINDOWPOSCHANGING", /* 0x0046 */
"WM_WINDOWPOSCHANGED", /* 0x0047 */
"WM_POWER",//0x0048
"WM_COPYGLOBALDATA",//0x0049
"WM_COPYDATA",//0x004a
"WM_CANCELJOURNAL",//0x004b
"WM_LOGONNOTIFY",//0x004c
"WM_KEYF1",//0x004d
"WM_NOTIFY",//0x004e
"WM_ACCESS_WINDOW",//0x004f
"WM_INPUTLANGCHANGEREQUEST",/* 0x0050 */
"WM_INPUTLANGCHANGE",//0x0051
"WM_TCARD",//0x0052
"WM_HELP",//0x0053
"WM_USERCHANGED",//0x0054
"WM_NOTIFYFORMAT",//0x0055
NULL,//0x0056
NULL,//0x0057
NULL,//0x0058
NULL,//0x0059
NULL,//0x005a
NULL,//0x005b
NULL,//0x005c
NULL,//0x005d
NULL,//0x005e
NULL,//0x005f
NULL,/* 0x0060 */
NULL,//0x0061
NULL,//0x0062
NULL,//0x0063
NULL,//0x0064
NULL,//0x0065
NULL,//0x0066
NULL,//0x0067
NULL,//0x0068
NULL,//0x0069
NULL,//0x006a
NULL,//0x006b
NULL,//0x006c
NULL,//0x006d
NULL,//0x006e
NULL,//0x006f
"WM_FINALDESTROY",/* 0x0070 */
"WM_MEASUREITEM_CLIENTDATA",//0x0071
"WM_TASKACTIVATED",//0x0072
"WM_TASKDEACTIVATED",//0x0073
"WM_TASKCREATED",//0x0074
"WM_TASKDESTROYED",//0x0075
"WM_TASKUICHANGED",//0x0076
"WM_TASKVISIBLE",//0x0077
"WM_TASKNOTVISIBLE",//0x0078
"WM_SETCURSORINFO",//0x0079
NULL,//0x007a
"WM_CONTEXTMENU",//0x007b
"WM_STYLECHANGING",//0x007c
"WM_STYLECHANGED",//0x007d
"WM_DISPLAYCHANGE",//0x007e
"WM_GETICON",//0x007f
"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",//0x0088
"WM_SYNCTASK",//0x0089
NULL,//0x008a
"WM_KLUDGEMINRECT",//0x008b
"WM_LPKDRAWSWITCHWND",//0x008c
NULL,//0x008d
NULL,//0x008e
NULL,//0x008f
NULL,/* 0x0090 */
NULL,//0x0091
NULL,//0x0092
NULL,//0x0093
NULL,//0x0094
NULL,//0x0095
NULL,//0x0096
NULL,//0x0097
NULL,//0x0098
NULL,//0x0099
NULL,//0x009a
NULL,//0x009b
NULL,//0x009c
NULL,//0x009d
NULL,//0x009e
NULL,//0x009f
"WM_NCMOUSEMOVE", /* 0x00A0 *//* 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
"WM_NCUAHDRAWCAPTION", /* 0x00AE */
"WM_NCUAHDRAWFRAME", /* 0x00AF */
"EM_GETSEL32", /* 0x00b0 */ /* 0x00B0 - Win32
Edit controls */
"EM_SETSEL32", /* 0x00b1 */
"EM_GETRECT32", /* 0x00b2 */
"EM_SETRECT32", /* 0x00b3 */
"EM_SETRECTNP32", /* 0x00b4 */
"EM_SCROLL32", /* 0x00b5 */
"EM_LINESCROLL32", /* 0x00b6 */
"EM_SCROLLCARET32", /* 0x00b7 */
"EM_GETMODIFY32", /* 0x00b8 */
"EM_SETMODIFY32", /* 0x00b9 */
"EM_GETLINECOUNT32", /* 0x00ba */
"EM_LINEINDEX32", /* 0x00bb */
"EM_SETHANDLE32", /* 0x00bc */
"EM_GETHANDLE32", /* 0x00bd */
"EM_GETTHUMB32", /* 0x00be */
NULL, /* 0x00bf */
NULL, /* 0x00c0 */
"EM_LINELENGTH32", /* 0x00c1 */
"EM_REPLACESEL32", /* 0x00c2 */
"EM_SETFONT", /* 0x00c3 */
"EM_GETLINE32", /* 0x00c4 */
"EM_LIMITTEXT32", /* 0x00c5 */
"EM_CANUNDO32", /* 0x00c6 */
"EM_UNDO32", /* 0x00c7 */
"EM_FMTLINES32", /* 0x00c8 */
"EM_LINEFROMCHAR32", /* 0x00c9 */
"EM_SETWORDBREAK", /* 0x00ca */
"EM_SETTABSTOPS32", /* 0x00cb */
"EM_SETPASSWORDCHAR32", /* 0x00cc */
"EM_EMPTYUNDOBUFFER32", /* 0x00cd */
"EM_GETFIRSTVISIBLELINE32", /* 0x00ce */
"EM_SETREADONLY32", /* 0x00cf */
"EM_SETWORDBREAKPROC32", /* 0x00d0 */
"EM_GETWORDBREAKPROC32", /* 0x00d1 */
"EM_GETPASSWORDCHAR32", /* 0x00d2 */
"EM_SETMARGINS32", /* 0x00d3 */
"EM_GETMARGINS32", /* 0x00d4 */
"EM_GETLIMITTEXT32", /* 0x00d5 */
"EM_POSFROMCHAR32", /* 0x00d6 */
"EM_CHARFROMPOS32", /* 0x00d7 */
"EM_SETIMESTATUS",//0x00D8
"EM_GETIMESTATUS",//0x00D9
"EM_MSGMAX",//0x00DA
NULL,//0x00DB
NULL,//0x00DC
NULL,//0x00DD
NULL,//0x00DE
NULL,//0x00DF
"SBM_SETPOS32", /* 0x00e0 *//* 0x00E0 - Win32
Scrollbars */
"SBM_GETPOS32", /* 0x00e1 */
"SBM_SETRANGE32", /* 0x00e2 */
"SBM_GETRANGE32", /* 0x00e3 */
"SBM_ENABLE_ARROWS32", /* 0x00e4 */
NULL,//0x00e5
"SBM_SETRANGEREDRAW32", /* 0x00e6 */
NULL,//0x00e7
NULL,//0x00e8
"SBM_SETSCROLLINFO32", /* 0x00e9 */
"SBM_GETSCROLLINFO32", /* 0x00ea */
NULL,//0x00eb
NULL,//0x00ec
NULL,//0x00ed
NULL,//0x00ee
NULL,//0x00ef
"BM_GETCHECK32", /* 0x00f0 *//* 0x00F0 - Win32
Buttons */
"BM_SETCHECK32", /* 0x00f1 */
"BM_GETSTATE32", /* 0x00f2 */
"BM_SETSTATE32", /* 0x00f3 */
"BM_SETSTYLE32", /* 0x00f4 */
"BM_CLICK32", /* 0x00f5 */
"BM_GETIMAGE32", /* 0x00f6 */
"BM_SETIMAGE32", /* 0x00f7 */
NULL,//0x00f8
NULL,//0x00f9
NULL,//0x00fa
NULL,//0x00fb
NULL,//0x00fc
NULL,//0x00fd
NULL,//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 */
"WM_YOMICHAR", /* 0x0108 */
"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,//0x0119
NULL,//0x011a
NULL,//0x011b
NULL,//0x011c
NULL,//0x011d
NULL,//0x011e
"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,//0x012a
NULL,//0x012b
NULL,//0x012c
NULL,//0x012d
NULL,//0x012e
NULL,//0x012f
NULL,/* 0x0130 */
"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,//0x0139
NULL,//0x013a
NULL,//0x013b
NULL,//0x013c
NULL,//0x013d
NULL,//0x013e
NULL,//0x013f
"CB_GETEDITSEL32", /* 0x0140 *//* 0x0140 - Win32
Comboboxes */
"CB_LIMITTEXT32", /* 0x0141 */
"CB_SETEDITSEL32", /* 0x0142 */
"CB_ADDSTRING32", /* 0x0143 */
"CB_DELETESTRING32", /* 0x0144 */
"CB_DIR32", /* 0x0145 */
"CB_GETCOUNT32", /* 0x0146 */
"CB_GETCURSEL32", /* 0x0147 */
"CB_GETLBTEXT32", /* 0x0148 */
"CB_GETLBTEXTLEN32", /* 0x0149 */
"CB_INSERTSTRING32", /* 0x014a */
"CB_RESETCONTENT32", /* 0x014b */
"CB_FINDSTRING32", /* 0x014c */
"CB_SELECTSTRING32", /* 0x014d */
"CB_SETCURSEL32", /* 0x014e */
"CB_SHOWDROPDOWN32", /* 0x014f */
"CB_GETITEMDATA32", /* 0x0150 */
"CB_SETITEMDATA32", /* 0x0151 */
"CB_GETDROPPEDCONTROLRECT32",/* 0x0152 */
"CB_SETITEMHEIGHT32", /* 0x0153 */
"CB_GETITEMHEIGHT32", /* 0x0154 */
"CB_SETEXTENDEDUI32", /* 0x0155 */
"CB_GETEXTENDEDUI32", /* 0x0156 */
"CB_GETDROPPEDSTATE32", /* 0x0157 */
"CB_FINDSTRINGEXACT32", /* 0x0158 */
"CB_SETLOCALE32", /* 0x0159 */
"CB_GETLOCALE32", /* 0x015a */
"CB_GETTOPINDEX32", /* 0x015b */
"CB_SETTOPINDEX32", /* 0x015c */
"CB_GETHORIZONTALEXTENT32", /* 0x015d */
"CB_SETHORIZONTALEXTENT32", /* 0x015e */
"CB_GETDROPPEDWIDTH32", /* 0x015f */
"CB_SETDROPPEDWIDTH32", /* 0x0160 */
"CB_INITSTORAGE32", /* 0x0161 */
NULL,//0x0162
"CB_MULTIPLEADDSTRING",//0x0163
"CB_GETCOMBOBOXINFO",//0x0164
NULL,//0x0165
NULL,//0x0166
NULL,//0x0167
NULL,//0x0168
NULL,//0x0169
NULL,//0x016a
NULL,//0x016b
NULL,//0x016c
NULL,//0x016d
NULL,//0x016e
NULL,//0x016f
"STM_SETICON32", /* 0x0170 */ /* 0x0170 - Win32 Static
controls */
"STM_GETICON32", /* 0x0171 */
"STM_SETIMAGE32", /* 0x0172 */
"STM_GETIMAGE32", /* 0x0173 */
"STM_MSGMAX",//0x0174
NULL,//0x0175
NULL,//0x0176
NULL,//0x0177
NULL,//0x0178
NULL,//0x0179
NULL,//0x017a
NULL,//0x017b
NULL,//0x017c
NULL,//0x017d
NULL,//0x017e
NULL,//0x017f
"LB_ADDSTRING32", /* 0x0180 *//* 0x0180 - Win32
Listboxes */
"LB_INSERTSTRING32", /* 0x0181 */
"LB_DELETESTRING32", /* 0x0182 */
"LB_SELITEMRANGEEX32", /* 0x0183 */
"LB_RESETCONTENT32", /* 0x0184 */
"LB_SETSEL32", /* 0x0185 */
"LB_SETCURSEL32", /* 0x0186 */
"LB_GETSEL32", /* 0x0187 */
"LB_GETCURSEL32", /* 0x0188 */
"LB_GETTEXT32", /* 0x0189 */
"LB_GETTEXTLEN32", /* 0x018a */
"LB_GETCOUNT32", /* 0x018b */
"LB_SELECTSTRING32", /* 0x018c */
"LB_DIR32", /* 0x018d */
"LB_GETTOPINDEX32", /* 0x018e */
"LB_FINDSTRING32", /* 0x018f */
"LB_GETSELCOUNT32", /* 0x0190 */
"LB_GETSELITEMS32", /* 0x0191 */
"LB_SETTABSTOPS32", /* 0x0192 */
"LB_GETHORIZONTALEXTENT32", /* 0x0193 */
"LB_SETHORIZONTALEXTENT32", /* 0x0194 */
"LB_SETCOLUMNWIDTH32", /* 0x0195 */
"LB_ADDFILE32", /* 0x0196 */
"LB_SETTOPINDEX32", /* 0x0197 */
"LB_GETITEMRECT32", /* 0x0198 */
"LB_GETITEMDATA32", /* 0x0199 */
"LB_SETITEMDATA32", /* 0x019a */
"LB_SELITEMRANGE32", /* 0x019b */
"LB_SETANCHORINDEX32", /* 0x019c */
"LB_GETANCHORINDEX32", /* 0x019d */
"LB_SETCARETINDEX32", /* 0x019e */
"LB_GETCARETINDEX32", /* 0x019f */
"LB_SETITEMHEIGHT32", /* 0x01a0 */
"LB_GETITEMHEIGHT32", /* 0x01a1 */
"LB_FINDSTRINGEXACT32", /* 0x01a2 */
"LB_CARETON32", /* 0x01a3 */
"LB_CARETOFF32", /* 0x01a4 */
"LB_SETLOCALE32", /* 0x01a5 */
"LB_GETLOCALE32", /* 0x01a6 */
"LB_SETCOUNT32", /* 0x01a7 */
"LB_INITSTORAGE32", /* 0x01a8 */
"LB_ITEMFROMPOINT32", /* 0x01a9 */
"LB_INSERTSTRINGUPPER",//0x01aa
"LB_INSERTSTRINGLOWER",//0x01ab
"LB_ADDSTRINGUPPER",//0x01ac
"LB_ADDSTRINGLOWER",//0x01ad
"LBCB_STARTTRACK",//0x01ae
"LBCB_ENDTRACK",//0x01af
NULL,/* 0x01B0 */
"LB_MULTIPLEADDSTRING",//0x01b1
"LB_GETLISTBOXINFO",//0x01b2
NULL,//0x01b3
NULL,//0x01b4
NULL,//0x01b5
NULL,//0x01b6
NULL,//0x01b7
NULL,//0x01b8
NULL,//0x01b9
NULL,//0x01ba
NULL,//0x01bb
NULL,//0x01bc
NULL,//0x01bd
NULL,//0x01be
NULL,//0x01bf
NULL,/* 0x01C0 */
NULL,//0x01c1
NULL,//0x01c2
NULL,//0x01c3
NULL,//0x01c4
NULL,//0x01c5
NULL,//0x01c6
NULL,//0x01c7
NULL,//0x01c8
NULL,//0x01c9
NULL,//0x01ca
NULL,//0x01cb
NULL,//0x01cc
NULL,//0x01cd
NULL,//0x01ce
NULL,//0x01cf
NULL,/* 0x01D0 */
NULL,//0x01d1
NULL,//0x01d2
NULL,//0x01d3
NULL,//0x01d4
NULL,//0x01d5
NULL,//0x01d6
NULL,//0x01d7
NULL,//0x01d8
NULL,//0x01d9
NULL,//0x01da
NULL,//0x01db
NULL,//0x01dc
NULL,//0x01dd
NULL,//0x01de
NULL,//0x01df
NULL,/* 0x01E0 */
NULL,//0x01e1
NULL,//0x01e2
"MN_SETHMENU",//0x01e3
"MN_GETHMENU",//0x01e4
"MN_SIZEWINDOW",//0x01e5
"MN_OPENHIERARCHY",//0x01e6
"MN_CLOSEHIERARCHY",//0x01e7
"MN_SELECTITEM",//0x01e8
"MN_CANCELMENUS",//0x01e9
"MN_SELECTFIRSTVALIDITEM",//0x01ea
NULL,//0x01eb
NULL,//0x01ec
NULL,//0x01ed
"MN_FINDMENUWINDOWFROMPOINT",//0x01ee
"MN_SHOWPOPUPWINDOW",//0x01ef
"MN_BUTTONUP",//0x01f0
"MN_SETTIMERTOOPENHIERARCHY",//0x01f1
"MN_DBLCLK",//0x01f2
"MN_ACTIVEPOPUP",//0x01f3
"MN_ENDMENU",//0x01f4
"MN_DODRAGDROP",//0x01f5
NULL,//0x01f6
NULL,//0x01f7
NULL,//0x01f8
NULL,//0x01f9
NULL,//0x01fa
NULL,//0x01fb
NULL,//0x01fc
NULL,//0x01fd
NULL,//0x01fe
NULL,//0x01ff
获取Windows消息名称(含VCL消息)-2
http://blog.csdn.net/DavidHsing/archive/2009/02/25/3935334.aspx
"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
NULL,//0x020e
NULL,//0x020f
"WM_PARENTNOTIFY", /* 0x0210 */
"WM_ENTERMENULOOP", /* 0x0211 */
"WM_EXITMENULOOP", /* 0x0212 */
"WM_NEXTMENU", /* 0x0213 */
"WM_SIZING",//0x0214
"WM_CAPTURECHANGED",//0x0215
"WM_MOVING",//0x0216
NULL,//0x0217
"WM_POWERBROADCAST",//0x0218
"WM_DEVICECHANGE",//0x0219
NULL,//0x021a
NULL,//0x021b
NULL,//0x021c
NULL,//0x021d
NULL,//0x021e
NULL,//0x021f
"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",//0x022a
"WM_QUERYDROPOBJECT",//0x022b
"WM_BEGINDRAG",//0x022c
"WM_DRAGLOOP",//0x022d
"WM_DRAGSELECT",//0x022e
"WM_DRAGMOVE",//0x022af
"WM_MDISETMENU", /* 0x0230 */
"WM_ENTERSIZEMOVE", /* 0x0231 */
"WM_EXITSIZEMOVE", /* 0x0232 */
"WM_DROPFILES", /* 0x0233 */
"WM_MDIREFRESHMENU",//0x0234
NULL,//0x0235
NULL,//0x0236
NULL,//0x0237
NULL,/* 0x0238*/
NULL,//0x0239
NULL,//0x023a
NULL,//0x023b
NULL,//0x023c
NULL,//0x023d
NULL,//0x023e
NULL,//0x023f
NULL,/* 0x0240 */
NULL,//0x0241
NULL,//0x0242
NULL,//0x0243
NULL,//0x0244
NULL,//0x0245
NULL,//0x0246
NULL,//0x0247
NULL,//0x0248
NULL,//0x0249
NULL,//0x024a
NULL,//0x024b
NULL,//0x024c
NULL,//0x024d
NULL,//0x024e
NULL,//0x024f
NULL,/* 0x0250 */
NULL,//0x0251
NULL,//0x0252
NULL,//0x0253
NULL,//0x0254
NULL,//0x0255
NULL,//0x0256
NULL,//0x0257
NULL,//0x0258
NULL,//0x0259
NULL,//0x025a
NULL,//0x025b
NULL,//0x025c
NULL,//0x025d
NULL,//0x025e
NULL,//0x025f
NULL,/* 0x0260 */
NULL,//0x0261
NULL,//0x0262
NULL,//0x0263
NULL,//0x0264
NULL,//0x0265
NULL,//0x0266
NULL,//0x0267
NULL,//0x0268
NULL,//0x0269
NULL,//0x026a
NULL,//0x026b
NULL,//0x026c
NULL,//0x026d
NULL,//0x026e
NULL,//0x026f
NULL,//0x0270
NULL,//0x0271
NULL,//0x0272
NULL,//0x0273
NULL,//0x0274
NULL,//0x0275
NULL,//0x0276
NULL,//0x0277
NULL,//0x0278
NULL,//0x0279
NULL,//0x027a
NULL,//0x027b
NULL,//0x027c
NULL,//0x027d
NULL,//0x027e
NULL,//0x027f
"WM_KANJIFIRST",/* 0x0280 */
"WM_IME_SETCONTENT",//0x0281
"WM_IME_NOTIFY",//0x0282
"WM_IME_CONTROL",//0x0283
"WM_IME_COMPOSITIONFULL",//0x0284
"WM_IME_SELECT",//0x0285
"WM_IME_CHAR",//0x0286
"WM_IME_SYSTEM",//0x0287
"WM_IME_REQUEST",//0x0288
NULL,//0x0289
NULL,//0x028a
NULL,//0x028b
NULL,//0x028c
NULL,//0x028d
NULL,//0x028e
NULL,//0x028f
"WM_IME_KEYDOWN",//0x0290
"WM_IME_KEYUP",//0x0291
NULL,//0x0292
NULL,//0x0293
NULL,//0x0294
NULL,//0x0295
NULL,//0x0296
NULL,//0x0297
NULL,//0x0298
NULL,//0x0299
NULL,//0x029a
NULL,//0x029b
NULL,//0x029c
NULL,//0x029d
NULL,//0x029e
"WM_KANJILAST",//0x029f
"WM_NCMOUSEHOVER",//0x02a0
"WM_MOUSEHOVER",//0x02a1
"WM_NCMOUSELEAVE",//0x02a2
"WM_MOUSELEAVE",//0x02a3
NULL,//0x02a4
NULL,//0x02a5
NULL,//0x02a6
NULL,//0x02a7
NULL,//0x02a8
NULL,//0x02a9
NULL,//0x02aa
NULL,//0x02ab
NULL,//0x02ac
NULL,//0x02ad
NULL,//0x02ae
NULL,//0x02af
NULL,//0x02b0
NULL,//0x02b1
NULL,//0x02b2
NULL,//0x02b3
NULL,//0x02b4
NULL,//0x02b5
NULL,//0x02b6
NULL,//0x02b7
NULL,//0x02b8
NULL,//0x02b9
NULL,//0x02ba
NULL,//0x02bb
NULL,//0x02bc
NULL,//0x02bd
NULL,//0x02be
NULL,//0x02bf
NULL,/* 0x02c0 */
NULL,//0x02c1
NULL,//0x02c2
NULL,//0x02c3
NULL,//0x02c4
NULL,//0x02c5
NULL,//0x02c6
NULL,//0x02c7
NULL,//0x02c8
NULL,//0x02c9
NULL,//0x02ca
NULL,//0x02cb
NULL,//0x02cc
NULL,//0x02cd
NULL,//0x02ce
NULL,//0x02cf
NULL,//0x02d0
NULL,//0x02d1
NULL,//0x02d2
NULL,//0x02d3
NULL,//0x02d4
NULL,//0x02d5
NULL,//0x02d6
NULL,//0x02d7
NULL,//0x02d8
NULL,//0x02d9
NULL,//0x02da
NULL,//0x02db
NULL,//0x02dc
NULL,//0x02dd
NULL,//0x02de
NULL,//0x02df
NULL,//0x02e0
NULL,//0x02e1
NULL,//0x02e2
NULL,//0x02e3
NULL,//0x02e4
NULL,//0x02e5
NULL,//0x02e6
NULL,//0x02e7
NULL,//0x02e8
NULL,//0x02e9
NULL,//0x02ea
NULL,//0x02eb
NULL,//0x02ec
NULL,//0x02ed
NULL,//0x02ee
NULL,//0x02ef
NULL,//0x02f0
NULL,//0x02f1
NULL,//0x02f2
NULL,//0x02f3
NULL,//0x02f4
NULL,//0x02f5
NULL,//0x02f6
NULL,//0x02f7
NULL,//0x02f8
NULL,//0x02f9
NULL,//0x02fa
NULL,//0x02fb
NULL,//0x02fc
NULL,//0x02fd
NULL,//0x02fe
NULL,//0x02ff
"WM_CUT", /* 0x0300 */
"WM_COPY",//0x0301
"WM_PASTE",//0x0302
"WM_CLEAR",//0x0303
"WM_UNDO",//0x0304
"WM_RENDERFORMAT",//0x0305
"WM_RENDERALLFORMATS",//0x0306
"WM_DESTROYCLIPBOARD",//0x0307
"WM_DRAWCLIPBOARD",//0x0308
"WM_PAINTCLIPBOARD",//0x0309
"WM_VSCROLLCLIPBOARD",//0x030a
"WM_SIZECLIPBOARD",//0x030b
"WM_ASKCBFORMATNAME",//0x030c
"WM_CHANGECBCHAIN",//0x030d
"WM_HSCROLLCLIPBOARD",//0x030e
"WM_QUERYNEWPALETTE", /* 0x030f*/
"WM_PALETTEISCHANGING",//0x0310
"WM_PALETTECHANGED",//0x0311
"WM_HOTKEY", /* 0x0312 */
"WM_HOOKMSG",//0x0313
"WM_SYSMENU",//0x0314
"WM_EXITPROCESS",//0x0315
"WM_WAKETHREAD",//0x0316
"WM_PRINT",//0x0317
"WM_PRINTCLIENT",//0x0318
"WM_APPCOMMAND",//0x0319
"WM_THEMECHANGED",//0x031a
"WM_UAHINIT",//0x031b
NULL,//0x031c
NULL,//0x031d
NULL,//0x031e
NULL,//0x031f
NULL,//0x0320
NULL,//0x0321
NULL,//0x0322
NULL,//0x0323
NULL,//0x0324
NULL,//0x0325
NULL,//0x0326
NULL,//0x0327
NULL,//0x0328
NULL,//0x0329
NULL,//0x032a
NULL,//0x032b
NULL,//0x032c
NULL,//0x032d
NULL,//0x032e
NULL,//0x032f
NULL,//0x0330
NULL,//0x0331
NULL,//0x0332
NULL,//0x0333
NULL,//0x0334
NULL,//0x0335
NULL,//0x0336
NULL,//0x0337
NULL,//0x0338
NULL,//0x0339
NULL,//0x033a
NULL,//0x033b
NULL,//0x033c
NULL,//0x033d
NULL,//0x033e
NULL,//0x033f
"WM_NOTIFYWOW",/* 0x0340 */
NULL,//0x0341
NULL,//0x0342
NULL,//0x0343
NULL,//0x0344
NULL,//0x0345
NULL,//0x0346
NULL,//0x0347
NULL,//0x0348
NULL,//0x0349
NULL,//0x034a
NULL,//0x034b
NULL,//0x034c
NULL,//0x034d
NULL,//0x034e
NULL,//0x034f
NULL,//0x0350
NULL,//0x0351
NULL,//0x0352
NULL,//0x0353
NULL,//0x0354
NULL,//0x0355
NULL,//0x0356
NULL,//0x0357
NULL,//0x0358
NULL,//0x0359
NULL,//0x035a
NULL,//0x035b
NULL,//0x035c
NULL,//0x035d
NULL,//0x035e
NULL,//0x035f
"WM_QUERYAFXWNDPROC", /* 0x0360 */
"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,//0x0370
NULL,//0x0371
NULL,//0x0372
"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,//0x037c
NULL,//0x037d
NULL,//0x037e
NULL,//0x037f
"WM_PENWINFIRST",/* 0x0380 */
"WM_RCRESULT",//0x0381
"WM_HOOKRCRESULT",//0x0382
"WM_GLOBALRCCHANGE",//0x0383
"WM_SKB",//0x0384
"WM_HEDITCTL",//0x0385
NULL,//0x0386
NULL,//0x0387
NULL,//0x0388
NULL,//0x0389
NULL,//0x038a
NULL,//0x038b
NULL,//0x038c
NULL,//0x038d
NULL,//0x038e
"WM_PENWINLAST",//0x038f
"WM_COALESCE_FIRST",//0x0390
NULL,//0x0391
NULL,//0x0392
NULL,//0x0393
NULL,//0x0394
NULL,//0x0395
NULL,//0x0396
NULL,//0x0397
NULL,//0x0398
NULL,//0x0399
NULL,//0x039a
NULL,//0x039b
NULL,//0x039c
NULL,//0x039d
NULL,//0x039e
"WM_COALESCE_LAST",//0x039f
"MM_JOY1MOVE",/* 0x03a0 */
"MM_JOY2MOVE",//0x03a1
"MM_JOY1ZMOVE",//0x03a2
"MM_JOY2ZMOVE",//0x03a3
NULL,//0x03a4
NULL,//0x03a5
NULL,//0x03a6
NULL,//0x03a7
NULL,//0x03a8
NULL,//0x03a9
NULL,//0x03aa
NULL,//0x03ab
NULL,//0x03ac
NULL,//0x03ad
NULL,//0x03ae
NULL,//0x03af
NULL,/* 0x03b0 */
NULL,//0x03b1
NULL,//0x03b2
NULL,//0x03b3
NULL,//0x03b4
"MM_JOY1BUTTONDOWN",//0x03b5
"MM_JOY2BUTTONDOWN",//0x03b6
"MM_JOY1BUTTONUP",//0x03b7
"MM_JOY2BUTTONUP",//0x03b8
"MM_MCINOTIFY",//0x03b9
NULL,//0x03ba
"MM_WOM_OPEN",//0x03bb
"MM_WOM_CLOSE",//0x03bc
"MM_WOM_DONE",//0x03bd
"MM_WIM_OPEN",//0x03be
"MM_WIM_CLOSE",//0x03bf
"MM_WIM_DATA",/* 0x03c0 */
"MM_MIM_OPEN",//0x03c1
"MM_MIM_CLOSE",//0x03c2
"MM_MIM_DATA",//0x03c3
"MM_MIM_LONGDATA",//0x03c4
"MM_MIM_ERROR",//0x03c5
"MM_MIM_LONGERROR",//0x03c6
"MM_MOM_OPEN",//0x03c7
"MM_MOM_CLOSE",//0x03c8
"MM_MOM_DONE",//0x03c9
NULL,//0x03ca
NULL,//0x03cb
NULL,//0x03cc
NULL,//0x03cd
NULL,//0x03ce
NULL,//0x03cf
NULL,//0x03d0
NULL,//0x03d1
NULL,//0x03d2
NULL,//0x03d3
NULL,//0x03d4
NULL,//0x03d5
NULL,//0x03d6
NULL,//0x03d7
NULL,//0x03d8
NULL,//0x03d9
NULL,//0x03da
NULL,//0x03db
NULL,//0x03dc
NULL,//0x03dd
NULL,//0x03de
"WM_MM_RESERVED_LAST",//0x03df
"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,//0x03e9
NULL,//0x03ea
NULL,//0x03eb
NULL,//0x03ec
NULL,//0x03ed
NULL,//0x03ee
NULL,//0x03ef
"WM_CBT_RESERVED_FIRST",/* 0x03f0 */
NULL,//0x03f1
NULL,//0x03f2
NULL,//0x03f3
NULL,//0x03f4
NULL,//0x03f5
NULL,//0x03f6
NULL,//0x03f7
NULL,//0x03f8
NULL,//0x03f9
NULL,//0x03fa
NULL,//0x03fb
NULL,//0x03fc
NULL,//0x03fd
NULL,//0x03fe
"WM_CBT_RESERVED_LAST",//0x03ff
"WM_USER"//0x0400
};
获取Windows消息名称(含VCL消息)-3
http://blog.csdn.net/DavidHsing/archive/2009/02/25/3935340.aspx
//VCL消息列表,定义在VCL的controls单元
#define MAX_VCL_MESSAGE 81
static const char * const CMMessageNames[MAX_VCL_MESSAGE+1]={
"CM_ACTIVATE",
"CM_DEACTIVATE",
"CM_GOTFOCUS",
"CM_LOSTFOCUS",
"CM_CANCELMODE",
"CM_DIALOGKEY",
"CM_DIALOGCHAR",
"CM_FOCUSCHANGED",
"CM_PARENTFONTCHANGED",
"CM_PARENTCOLORCHANGED",
"CM_HITTEST",
"CM_VISIBLECHANGED",
"CM_ENABLEDCHANGED",
"CM_COLORCHANGED",
"CM_FONTCHANGED",
"CM_CURSORCHANGED",
"CM_CTL3DCHANGED",
"CM_PARENTCTL3DCHANGED",
"CM_TEXTCHANGED",
"CM_MOUSEENTER",
"CM_MOUSELEAVE",
"CM_MENUCHANGED",
"CM_APPKEYDOWN",
"CM_APPSYSCOMMAND",
"CM_BUTTONPRESSED",
"CM_SHOWINGCHANGED",
"CM_ENTER",
"CM_EXIT",
"CM_DESIGNHITTEST",
"CM_ICONCHANGED",
"CM_WANTSPECIALKEY",
"CM_INVOKEHELP",
"CM_WINDOWHOOK",
"CM_RELEASE",
"CM_SHOWHINTCHANGED",
"CM_PARENTSHOWHINTCHANGED",
"CM_SYSCOLORCHANGE",
"CM_WININICHANGE",
"CM_FONTCHANGE",
"CM_TIMECHANGE",
"CM_TABSTOPCHANGED",
"CM_UIACTIVATE",
"CM_UIDEACTIVATE",
"CM_DOCWINDOWACTIVATE",
"CM_CONTROLLISTCHANGE",
"CM_GETDATALINK",
"CM_CHILDKEY",
"CM_DRAG",
"CM_HINTSHOW",
"CM_DIALOGHANDLE",
"CM_ISTOOLCONTROL",
"CM_RECREATEWND",
"CM_INVALIDATE",
"CM_SYSFONTCHANGED",
"CM_CONTROLCHANGE",
"CM_CHANGED",
"CM_DOCKCLIENT",
"CM_UNDOCKCLIENT",
"CM_FLOAT",
"CM_BORDERCHANGED",
"CM_BIDIMODECHANGED",
"CM_PARENTBIDIMODECHANGED",
"CM_ALLCHILDRENFLIPPED",
"CM_ACTIONUPDATE",
"CM_ACTIONEXECUTE",
"CM_HINTSHOWPAUSE",
"CM_DOCKNOTIFICATION",
"CM_MOUSEWHEEL",
"CM_ISSHORTCUT",
"CM_UPDATEACTIONS",
"CM_INVALIDATEDOCKHOST",
"CM_SETACTIVECONTROL",
"CM_POPUPHWNDDESTROY",
"CM_CREATEPOPUP",
"CM_DESTROYHANDLE",
"CM_MOUSEACTIVATE",
"CM_CONTROLLISTCHANGING",
"CM_BUFFEREDPRINTCLIENT",
"CM_UNTHEMECONTROL",
"CM_DOUBLEBUFFEREDCHANGED",
"CM_PARENTDOUBLEBUFFEREDCHANGED",
"CM_THEMECHANGED"
};
String __fastcall MessageName(UINT msg)
{
String RetVal;
if (msg <= WM_USER)
{
RetVal = MessageTypeNames[msg];
}
else
{
if (msg >= CM_BASE)
{
if (msg <= CM_BASE + MAX_VCL_MESSAGE)
{
RetVal = CMMessageNames[msg - CM_BASE];
}
else if (msg - CN_BASE < WM_USER)
{
RetVal = "CN" + String(MessageTypeNames[msg - CN_BASE]).SubString(3, 255);
}
}
}
if (RetVal.Length() == 0)
{
char AName[256];
if (GetClipboardFormatName(msg, AName, 255))
//获取通过RegisterWindowMessage定义的消息的名称
{
RetVal = AName;
}
else
{
if (msg >= WM_APP)
{
RetVal = "WM_APP+" + IntToStr(msg - WM_APP) + "(0x" + IntToHex((int)(msg - WM_APP), 4) + ")";
}
else
{
RetVal = "WM_USER+" + IntToStr(msg - WM_USER) + "(0x" + IntToHex((int)(msg - WM_USER), 4) + ")";
}
}
}
return RetVal.Length() ? RetVal : String("(Unknown)"); //如果消息名称仍未知,那就是一个可能未知的新消息了
}