xref: /reactos/sdk/include/reactos/msgdump.h (revision 1734f297)
1 /*
2  * PROJECT:     ReactOS header files
3  * LICENSE:     CC-BY-4.0 (https://spdx.org/licenses/CC-BY-4.0)
4  * PURPOSE:     Win32API message dumping
5  * COPYRIGHT:   Copyright 2018-2021 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6  */
7 #ifndef _INC_MSGDUMP
8 #define _INC_MSGDUMP    18   /* Version 18 */
9 
10 /*
11  * NOTE: MD_msgdump function in this file provides Win32API message dump feature.
12  * NOTE: This header file takes time to compile.
13  *       You might indirectly use MD_msgdump function.
14  */
15 #pragma once
16 
17 #ifndef _INC_WINXX
18     #include "winxx.h"      /* An unofficial extension of <windowsx.h>. */
19 #endif
20 #ifndef _INC_SHELLAPI
21     #include <shellapi.h>
22 #endif
23 #include <strsafe.h>
24 
25 #ifndef MSGDUMP_TPRINTF
26     #error Please define MSGDUMP_TPRINTF macro before #include "msgdump.h".
27 #endif
28 
29 #ifndef MSGDUMP_API
30     #define MSGDUMP_API  WINAPI
31 #endif
32 
33 #ifndef MSGDUMP_PREFIX
34     #define MSGDUMP_PREFIX TEXT("")
35 #endif
36 
37 /* MD_msgdump function */
38 static __inline LRESULT MSGDUMP_API
39 MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
40 
41 /* MD_msgresult function */
42 static __inline LRESULT MSGDUMP_API
43 MD_msgresult(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT lResult);
44 
45 /*---- The below codes are boring details of MD_msgdump and MD_msgresult implementation. ----*/
46 
47 #define MSGDUMP_MAX_RECT_TEXT   64
48 
49 static __inline const TCHAR * MSGDUMP_API
50 MD_rect_text(TCHAR *buf, size_t bufsize, const RECT *prc)
51 {
52     if (prc == NULL)
53     {
54         StringCbCopy(buf, bufsize, TEXT("(null)"));
55     }
56     else
57     {
58         StringCbPrintf(buf, bufsize, TEXT("(%ld, %ld, %ld, %ld)"),
59                        prc->left, prc->top, prc->right, prc->bottom);
60     }
61     return buf;
62 }
63 
64 static __inline LRESULT MSGDUMP_API
65 MD_OnUnknown(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
66 {
67     TCHAR szName[64];
68     if (0xC000 <= uMsg && uMsg <= 0xFFFF &&
69         GlobalGetAtomName(uMsg, szName, ARRAYSIZE(szName)))
70     {
71         /* RegisterWindowMessage'd message */
72         MSGDUMP_TPRINTF(TEXT("%s'%s'(%u)(hwnd:%p, wParam:%p, lParam:%p)\n"),
73                         MSGDUMP_PREFIX, szName, uMsg, (void *)hwnd, (void *)wParam,
74                         (void *)lParam);
75         return 0;
76     }
77 
78     MSGDUMP_TPRINTF(TEXT("%sWM_%u(hwnd:%p, wParam:%p, lParam:%p)\n"),
79                     MSGDUMP_PREFIX, uMsg, (void *)hwnd, (void *)wParam, (void *)lParam);
80     return 0;
81 }
82 
83 static __inline LRESULT MSGDUMP_API
84 MD_OnUser(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
85 {
86     MSGDUMP_TPRINTF(TEXT("%sWM_USER+%u(hwnd:%p, wParam:%p, lParam:%p)\n"),
87                     MSGDUMP_PREFIX, uMsg - WM_USER, (void *)hwnd, (void *)wParam, (void *)lParam);
88     return 0;
89 }
90 
91 static __inline LRESULT MSGDUMP_API
92 MD_OnApp(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
93 {
94     MSGDUMP_TPRINTF(TEXT("%sWM_APP+%u(hwnd:%p, wParam:%p, lParam:%p)\n"),
95                     MSGDUMP_PREFIX, uMsg - WM_APP, (void *)hwnd, (void *)wParam, (void *)lParam);
96     return 0;
97 }
98 
99 static __inline LRESULT MSGDUMP_API
100 MD_OnNull(HWND hwnd)
101 {
102     MSGDUMP_TPRINTF(TEXT("%sWM_NULL(hwnd:%p)\n"),
103                     MSGDUMP_PREFIX, (void *)hwnd);
104     return 0;
105 }
106 
107 static __inline BOOL MSGDUMP_API
108 MD_OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
109 {
110     MSGDUMP_TPRINTF(TEXT("%sWM_CREATE(hwnd:%p, lpCreateStruct:%p)\n"),
111                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpCreateStruct);
112     return TRUE;
113 }
114 
115 static __inline void MSGDUMP_API
116 MD_OnDestroy(HWND hwnd)
117 {
118     MSGDUMP_TPRINTF(TEXT("%sWM_DESTROY(hwnd:%p)\n"),
119                     MSGDUMP_PREFIX, (void *)hwnd);
120 }
121 
122 static __inline void MSGDUMP_API
123 MD_OnMove(HWND hwnd, int x, int y)
124 {
125     MSGDUMP_TPRINTF(TEXT("%sWM_MOVE(hwnd:%p, x:%d, y:%d)\n"),
126                     MSGDUMP_PREFIX, (void *)hwnd, x, y);
127 }
128 
129 static __inline void MSGDUMP_API
130 MD_OnSize(HWND hwnd, UINT state, int cx, int cy)
131 {
132     MSGDUMP_TPRINTF(TEXT("%sWM_SIZE(hwnd:%p, state:%u, cx:%d, cy:%d)\n"),
133                     MSGDUMP_PREFIX, (void *)hwnd, state, cx, cy);
134 }
135 
136 static __inline void MSGDUMP_API
137 MD_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
138 {
139     MSGDUMP_TPRINTF(TEXT("%sWM_ACTIVATE(hwnd:%p, state:%u, hwndActDeact:%p, fMinimized:%d)\n"),
140                     MSGDUMP_PREFIX, (void *)hwnd, state, (void *)hwndActDeact, fMinimized);
141 }
142 
143 static __inline void MSGDUMP_API
144 MD_OnSetFocus(HWND hwnd, HWND hwndOldFocus)
145 {
146     MSGDUMP_TPRINTF(TEXT("%sWM_SETFOCUS(hwnd:%p, hwndOldFocus:%p)\n"),
147                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndOldFocus);
148 }
149 
150 static __inline void MSGDUMP_API
151 MD_OnKillFocus(HWND hwnd, HWND hwndNewFocus)
152 {
153     MSGDUMP_TPRINTF(TEXT("%sWM_KILLFOCUS(hwnd:%p, hwndNewFocus:%p)\n"),
154                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndNewFocus);
155 }
156 
157 static __inline void MSGDUMP_API
158 MD_OnEnable(HWND hwnd, BOOL fEnable)
159 {
160     MSGDUMP_TPRINTF(TEXT("%sWM_ENABLE(hwnd:%p, fEnable:%d)\n"),
161                     MSGDUMP_PREFIX, (void *)hwnd, fEnable);
162 }
163 
164 static __inline void MSGDUMP_API
165 MD_OnSetRedraw(HWND hwnd, BOOL fRedraw)
166 {
167     MSGDUMP_TPRINTF(TEXT("%sWM_SETREDRAW(hwnd:%p, fRedraw:%d)\n"),
168                     MSGDUMP_PREFIX, (void *)hwnd, fRedraw);
169 }
170 
171 static __inline void MSGDUMP_API
172 MD_OnSetText(HWND hwnd, LPCTSTR lpszText)
173 {
174     if (IsWindowUnicode(hwnd))
175         MSGDUMP_TPRINTF(TEXT("%sWM_SETTEXT(hwnd:%p, lpszText:%ls)\n"),
176                         MSGDUMP_PREFIX, (void *)hwnd, (LPCWSTR)lpszText);
177     else
178         MSGDUMP_TPRINTF(TEXT("%sWM_SETTEXT(hwnd:%p, lpszText:%hs)\n"),
179                         MSGDUMP_PREFIX, (void *)hwnd, (LPCSTR)lpszText);
180 }
181 
182 static __inline INT MSGDUMP_API
183 MD_OnGetText(HWND hwnd, int cchTextMax, LPTSTR lpszText)
184 {
185     MSGDUMP_TPRINTF(TEXT("%sWM_GETTEXT(hwnd:%p, cchTextMax:%d, lpszText:%p)\n"),
186                     MSGDUMP_PREFIX, (void *)hwnd, cchTextMax, (void *)lpszText);
187     return 0;
188 }
189 
190 static __inline INT MSGDUMP_API
191 MD_OnGetTextLength(HWND hwnd)
192 {
193     MSGDUMP_TPRINTF(TEXT("%sWM_GETTEXTLENGTH(hwnd:%p)\n"),
194                     MSGDUMP_PREFIX, (void *)hwnd);
195     return 0;
196 }
197 
198 static __inline void MSGDUMP_API
199 MD_OnPaint(HWND hwnd)
200 {
201     MSGDUMP_TPRINTF(TEXT("%sWM_PAINT(hwnd:%p)\n"),
202                     MSGDUMP_PREFIX, (void *)hwnd);
203 }
204 
205 static __inline void MSGDUMP_API
206 MD_OnClose(HWND hwnd)
207 {
208     MSGDUMP_TPRINTF(TEXT("%sWM_CLOSE(hwnd:%p)\n"),
209                     MSGDUMP_PREFIX, (void *)hwnd);
210 }
211 
212 static __inline BOOL MSGDUMP_API
213 MD_OnQueryEndSession(HWND hwnd)
214 {
215     MSGDUMP_TPRINTF(TEXT("%sWM_QUERYENDSESSION(hwnd:%p)\n"),
216                     MSGDUMP_PREFIX, (void *)hwnd);
217     return FALSE;
218 }
219 
220 static __inline BOOL MSGDUMP_API
221 MD_OnQueryOpen(HWND hwnd)
222 {
223     MSGDUMP_TPRINTF(TEXT("%sWM_QUERYOPEN(hwnd:%p)\n"),
224                     MSGDUMP_PREFIX, (void *)hwnd);
225     return FALSE;
226 }
227 
228 static __inline void MSGDUMP_API
229 MD_OnEndSession(HWND hwnd, BOOL fEnding)
230 {
231     MSGDUMP_TPRINTF(TEXT("%sWM_ENDSESSION(hwnd:%p, fEnding:%d)\n"),
232                     MSGDUMP_PREFIX, (void *)hwnd, fEnding);
233 }
234 
235 static __inline void MSGDUMP_API
236 MD_OnQuit(HWND hwnd, int exitCode)
237 {
238     MSGDUMP_TPRINTF(TEXT("%sWM_QUIT(hwnd:%p, exitCode:%d)\n"),
239                     MSGDUMP_PREFIX, (void *)hwnd, exitCode);
240 }
241 
242 static __inline BOOL MSGDUMP_API
243 MD_OnEraseBkgnd(HWND hwnd, HDC hdc)
244 {
245     MSGDUMP_TPRINTF(TEXT("%sWM_ERASEBKGND(hwnd:%p, hdc:%p)\n"),
246                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hdc);
247     return FALSE;
248 }
249 
250 static __inline void MSGDUMP_API
251 MD_OnSysColorChange(HWND hwnd)
252 {
253     MSGDUMP_TPRINTF(TEXT("%sWM_SYSCOLORCHANGE(hwnd:%p)\n"),
254                     MSGDUMP_PREFIX, (void *)hwnd);
255 }
256 
257 static __inline void MSGDUMP_API
258 MD_OnShowWindow(HWND hwnd, BOOL fShow, UINT status)
259 {
260     MSGDUMP_TPRINTF(TEXT("%sWM_SHOWWINDOW(hwnd:%p, fShow:%d, status:%u)\n"),
261                     MSGDUMP_PREFIX, (void *)hwnd, fShow, status);
262 }
263 
264 static __inline LRESULT MSGDUMP_API
265 MD_OnSettingChange(HWND hwnd, UINT_PTR wFlag, LPCTSTR pszSection)
266 {
267     MSGDUMP_TPRINTF(TEXT("%sWM_SETTINGCHANGE(hwnd:%p, wFlag:%p, pszSection:%s)\n"),
268                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wFlag, pszSection);
269     return 0;
270 }
271 
272 static __inline void MSGDUMP_API
273 MD_OnDevModeChange(HWND hwnd, LPCTSTR lpszDeviceName)
274 {
275     if (IsWindowUnicode(hwnd))
276         MSGDUMP_TPRINTF(TEXT("%sWM_DEVMODECHANGE(hwnd:%p, lpszDeviceName:%ls)\n"),
277                         MSGDUMP_PREFIX, (void *)hwnd, (LPCWSTR)lpszDeviceName);
278     else
279         MSGDUMP_TPRINTF(TEXT("%sWM_DEVMODECHANGE(hwnd:%p, lpszDeviceName:%hs)\n"),
280                         MSGDUMP_PREFIX, (void *)hwnd, (LPCSTR)lpszDeviceName);
281 }
282 
283 static __inline void MSGDUMP_API
284 MD_OnActivateApp(HWND hwnd, BOOL fActivate, DWORD dwThreadId)
285 {
286     MSGDUMP_TPRINTF(TEXT("%sWM_ACTIVATEAPP(hwnd:%p, fActivate:%d, dwThreadId:0x%08lX)\n"),
287                     MSGDUMP_PREFIX, (void *)hwnd, fActivate, dwThreadId);
288 }
289 
290 static __inline void MSGDUMP_API
291 MD_OnFontChange(HWND hwnd)
292 {
293     MSGDUMP_TPRINTF(TEXT("%sWM_FONTCHANGE(hwnd:%p)\n"),
294                     MSGDUMP_PREFIX, (void *)hwnd);
295 }
296 
297 static __inline void MSGDUMP_API
298 MD_OnTimeChange(HWND hwnd)
299 {
300     MSGDUMP_TPRINTF(TEXT("%sWM_TIMECHANGE(hwnd:%p)\n"),
301                     MSGDUMP_PREFIX, (void *)hwnd);
302 }
303 
304 static __inline void MSGDUMP_API
305 MD_OnCancelMode(HWND hwnd)
306 {
307     MSGDUMP_TPRINTF(TEXT("%sWM_CANCELMODE(hwnd:%p)\n"),
308                     MSGDUMP_PREFIX, (void *)hwnd);
309 }
310 
311 static __inline BOOL MSGDUMP_API
312 MD_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg)
313 {
314     MSGDUMP_TPRINTF(TEXT("%sWM_SETCURSOR(hwnd:%p, hwndCursor:%p, codeHitTest:%u, msg:%u)\n"),
315                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCursor, codeHitTest, msg);
316     return FALSE;
317 }
318 
319 static __inline int MSGDUMP_API
320 MD_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg)
321 {
322     MSGDUMP_TPRINTF(TEXT("%sWM_MOUSEACTIVATE(hwnd:%p, hwndTopLevel:%p, codeHitTest:%u, msg:%u)\n"),
323                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndTopLevel, codeHitTest, msg);
324     return 0;
325 }
326 
327 static __inline void MSGDUMP_API
328 MD_OnChildActivate(HWND hwnd)
329 {
330     MSGDUMP_TPRINTF(TEXT("%sWM_CHILDACTIVATE(hwnd:%p)\n"),
331                     MSGDUMP_PREFIX, (void *)hwnd);
332 }
333 
334 static __inline void MSGDUMP_API
335 MD_OnQueueSync(HWND hwnd)
336 {
337     MSGDUMP_TPRINTF(TEXT("%sWM_QUEUESYNC(hwnd:%p)\n"),
338                     MSGDUMP_PREFIX, (void *)hwnd);
339 }
340 
341 static __inline void MSGDUMP_API
342 MD_OnGetMinMaxInfo(HWND hwnd, LPMINMAXINFO lpMinMaxInfo)
343 {
344     MSGDUMP_TPRINTF(TEXT("%sWM_GETMINMAXINFO(hwnd:%p, lpMinMaxInfo:%p)\n"),
345                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpMinMaxInfo);
346 }
347 
348 static __inline BOOL MSGDUMP_API
349 MD_OnIconEraseBkgnd(HWND hwnd, HDC hdc)
350 {
351     MSGDUMP_TPRINTF(TEXT("%sWM_ICONERASEBKGND(hwnd:%p, hdc:%p)\n"),
352                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hdc);
353     return FALSE;
354 }
355 
356 static __inline HWND MSGDUMP_API
357 MD_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext)
358 {
359     MSGDUMP_TPRINTF(TEXT("%sWM_NEXTDLGCTL(hwnd:%p, hwndSetFocus:%p, fNext:%d)\n"),
360                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndSetFocus, fNext);
361     return NULL;
362 }
363 
364 static __inline void MSGDUMP_API
365 MD_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue)
366 {
367     MSGDUMP_TPRINTF(TEXT("%sWM_SPOOLERSTATUS(hwnd:%p, status:%u, cJobInQueue:%d)\n"),
368                     MSGDUMP_PREFIX, (void *)hwnd, status, cJobInQueue);
369 }
370 
371 static __inline void MSGDUMP_API
372 MD_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT * lpDrawItem)
373 {
374     MSGDUMP_TPRINTF(TEXT("%sWM_DRAWITEM(hwnd:%p, lpDrawItem:%p)\n"),
375                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpDrawItem);
376 }
377 
378 static __inline void MSGDUMP_API
379 MD_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT * lpMeasureItem)
380 {
381     MSGDUMP_TPRINTF(TEXT("%sWM_MEASUREITEM(hwnd:%p, lpMeasureItem:%p)\n"),
382                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpMeasureItem);
383 }
384 
385 static __inline void MSGDUMP_API
386 MD_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT * lpDeleteItem)
387 {
388     MSGDUMP_TPRINTF(TEXT("%sWM_DELETEITEM(hwnd:%p, lpDeleteItem:%p)\n"),
389                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpDeleteItem);
390 }
391 
392 static __inline int MSGDUMP_API
393 MD_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret)
394 {
395     MSGDUMP_TPRINTF(TEXT("%sWM_VKEYTOITEM(hwnd:%p, vk:%u, hwndListbox:%p, iCaret:%d)\n"),
396                     MSGDUMP_PREFIX, (void *)hwnd, vk, (void *)hwndListbox, iCaret);
397     return 0;
398 }
399 
400 static __inline int MSGDUMP_API
401 MD_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret)
402 {
403     MSGDUMP_TPRINTF(TEXT("%sWM_CHARTOITEM(hwnd:%p, ch:%u, hwndListbox:%p, iCaret:%d)\n"),
404                     MSGDUMP_PREFIX, (void *)hwnd, ch, (void *)hwndListbox, iCaret);
405     return 0;
406 }
407 
408 static __inline void MSGDUMP_API
409 MD_OnSetFont(HWND hwnd, HFONT hfont, BOOL fRedraw)
410 {
411     MSGDUMP_TPRINTF(TEXT("%sWM_SETFONT(hwnd:%p, hfont:%p, fRedraw:%d)\n"),
412                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hfont, fRedraw);
413 }
414 
415 static __inline HFONT MSGDUMP_API
416 MD_OnGetFont(HWND hwnd)
417 {
418     MSGDUMP_TPRINTF(TEXT("%sWM_GETFONT(hwnd:%p)\n"),
419                     MSGDUMP_PREFIX, (void *)hwnd);
420     return NULL;
421 }
422 
423 static __inline HICON MSGDUMP_API
424 MD_OnQueryDragIcon(HWND hwnd)
425 {
426     MSGDUMP_TPRINTF(TEXT("%sWM_QUERYDRAGICON(hwnd:%p)\n"),
427                     MSGDUMP_PREFIX, (void *)hwnd);
428     return NULL;
429 }
430 
431 static __inline int MSGDUMP_API
432 MD_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT * lpCompareItem)
433 {
434     MSGDUMP_TPRINTF(TEXT("%sWM_COMPAREITEM(hwnd:%p, lpCompareItem:%p)\n"),
435                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpCompareItem);
436     return 0;
437 }
438 
439 static __inline void MSGDUMP_API
440 MD_OnCompacting(HWND hwnd, UINT compactRatio)
441 {
442     MSGDUMP_TPRINTF(TEXT("%sWM_COMPACTING(hwnd:%p, compactRatio:%u)\n"),
443                     MSGDUMP_PREFIX, (void *)hwnd, compactRatio);
444 }
445 
446 static __inline void MSGDUMP_API
447 MD_OnCommNotify(HWND hwnd, int cid, UINT flags)
448 {
449     MSGDUMP_TPRINTF(TEXT("%sWM_COMMNOTIFY(hwnd:%p, cid:%d, flags:%u)\n"),
450                     MSGDUMP_PREFIX, (void *)hwnd, cid, flags);
451 }
452 
453 static __inline BOOL MSGDUMP_API
454 MD_OnWindowPosChanging(HWND hwnd, LPWINDOWPOS lpwpos)
455 {
456     MSGDUMP_TPRINTF(TEXT("%sWM_WINDOWPOSCHANGING(hwnd:%p, lpwpos:%p)\n"),
457                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpwpos);
458     return FALSE;
459 }
460 
461 static __inline void MSGDUMP_API
462 MD_OnWindowPosChanged(HWND hwnd, const LPWINDOWPOS lpwpos)
463 {
464     MSGDUMP_TPRINTF(TEXT("%sWM_WINDOWPOSCHANGED(hwnd:%p, lpwpos:%p)\n"),
465                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpwpos);
466 }
467 
468 static __inline void MSGDUMP_API
469 MD_OnPower(HWND hwnd, int code)
470 {
471     MSGDUMP_TPRINTF(TEXT("%sWM_POWER(hwnd:%p, code:%d)\n"),
472                     MSGDUMP_PREFIX, (void *)hwnd, code);
473 }
474 
475 static __inline BOOL MSGDUMP_API
476 MD_OnCopyData(HWND hwnd, HWND hwndFrom, PCOPYDATASTRUCT pcds)
477 {
478     MSGDUMP_TPRINTF(TEXT("%sWM_COPYDATA(hwnd:%p, hwndFrom:%p, pcds:%p)\n"),
479                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndFrom, (void *)pcds);
480     return FALSE;
481 }
482 
483 static __inline LPCTSTR MSGDUMP_API
484 MD_GetNotifyCode(HWND hwndFrom, UINT code)
485 {
486     TCHAR szClass[24], sz[2];
487     static TCHAR s_szText[64];
488 
489     switch (code)
490     {
491         case NM_OUTOFMEMORY: return TEXT("NM_OUTOFMEMORY");
492         case NM_CLICK: return TEXT("NM_CLICK");
493         case NM_DBLCLK: return TEXT("NM_DBLCLK");
494         case NM_RETURN: return TEXT("NM_RETURN");
495         case NM_RCLICK: return TEXT("NM_RCLICK");
496         case NM_RDBLCLK: return TEXT("NM_RDBLCLK");
497         case NM_SETFOCUS: return TEXT("NM_SETFOCUS");
498         case NM_KILLFOCUS: return TEXT("NM_KILLFOCUS");
499 #if (_WIN32_IE >= 0x0300)
500         case NM_CUSTOMDRAW: return TEXT("NM_CUSTOMDRAW");
501         case NM_HOVER: return TEXT("NM_HOVER");
502 #endif
503 #if (_WIN32_IE >= 0x0400)
504         case NM_NCHITTEST: return TEXT("NM_NCHITTEST");
505         case NM_KEYDOWN: return TEXT("NM_KEYDOWN");
506         case NM_RELEASEDCAPTURE: return TEXT("NM_RELEASEDCAPTURE");
507         case NM_SETCURSOR: return TEXT("NM_SETCURSOR");
508         case NM_CHAR: return TEXT("NM_CHAR");
509 #endif
510 #if (_WIN32_IE >= 0x0401)
511         case NM_TOOLTIPSCREATED: return TEXT("NM_TOOLTIPSCREATED");
512 #endif
513 #if (_WIN32_IE >= 0x0500)
514         case NM_LDOWN: return TEXT("NM_LDOWN");
515         case NM_RDOWN: return TEXT("NM_RDOWN");
516 #endif
517     }
518 
519     szClass[0] = 0;
520     GetClassName(hwndFrom, szClass, ARRAYSIZE(szClass));
521     sz[0] = szClass[0];
522     sz[1] = 0;
523     CharUpper(sz);
524 
525     if (sz[0] == TEXT('R') && lstrcmpi(szClass, RICHEDIT_CLASS) == 0)
526     {
527         switch (code)
528         {
529             case EN_MSGFILTER: return TEXT("EN_MSGFILTER");
530             case EN_REQUESTRESIZE: return TEXT("EN_REQUESTRESIZE");
531             case EN_SELCHANGE: return TEXT("EN_SELCHANGE");
532             case EN_DROPFILES: return TEXT("EN_DROPFILES");
533             case EN_PROTECTED: return TEXT("EN_PROTECTED");
534             case EN_CORRECTTEXT: return TEXT("EN_CORRECTTEXT");
535             case EN_STOPNOUNDO: return TEXT("EN_STOPNOUNDO");
536             case EN_IMECHANGE: return TEXT("EN_IMECHANGE");
537             case EN_SAVECLIPBOARD: return TEXT("EN_SAVECLIPBOARD");
538             case EN_OLEOPFAILED: return TEXT("EN_OLEOPFAILED");
539             case EN_OBJECTPOSITIONS: return TEXT("EN_OBJECTPOSITIONS");
540             case EN_LINK: return TEXT("EN_LINK");
541             case EN_DRAGDROPDONE: return TEXT("EN_DRAGDROPDONE");
542             case EN_PARAGRAPHEXPANDED: return TEXT("EN_PARAGRAPHEXPANDED");
543             case EN_PAGECHANGE: return TEXT("EN_PAGECHANGE");
544             case EN_LOWFIRTF: return TEXT("EN_LOWFIRTF");
545             case EN_ALIGNLTR: return TEXT("EN_ALIGNLTR");
546             case EN_ALIGNRTL: return TEXT("EN_ALIGNRTL");
547 #if _RICHEDIT_VER >= 0x0800
548             case EN_CLIPFORMAT: return TEXT("EN_CLIPFORMAT");
549             case EN_STARTCOMPOSITION: return TEXT("EN_STARTCOMPOSITION");
550             case EN_ENDCOMPOSITION: return TEXT("EN_ENDCOMPOSITION");
551 #endif
552         }
553     }
554     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_LISTVIEW) == 0)
555     {
556         switch (code)
557         {
558             case LVN_ITEMCHANGING: return TEXT("LVN_ITEMCHANGING");
559             case LVN_ITEMCHANGED: return TEXT("LVN_ITEMCHANGED");
560             case LVN_INSERTITEM: return TEXT("LVN_INSERTITEM");
561             case LVN_DELETEITEM: return TEXT("LVN_DELETEITEM");
562             case LVN_DELETEALLITEMS: return TEXT("LVN_DELETEALLITEMS");
563             case LVN_BEGINLABELEDITA: return TEXT("LVN_BEGINLABELEDITA");
564             case LVN_BEGINLABELEDITW: return TEXT("LVN_BEGINLABELEDITW");
565             case LVN_ENDLABELEDITA: return TEXT("LVN_ENDLABELEDITA");
566             case LVN_ENDLABELEDITW: return TEXT("LVN_ENDLABELEDITW");
567             case LVN_COLUMNCLICK: return TEXT("LVN_COLUMNCLICK");
568             case LVN_BEGINDRAG: return TEXT("LVN_BEGINDRAG");
569             case LVN_BEGINRDRAG: return TEXT("LVN_BEGINRDRAG");
570             case LVN_ODCACHEHINT: return TEXT("LVN_ODCACHEHINT");
571             case LVN_ODFINDITEMA: return TEXT("LVN_ODFINDITEMA");
572             case LVN_ODFINDITEMW: return TEXT("LVN_ODFINDITEMW");
573             case LVN_ITEMACTIVATE: return TEXT("LVN_ITEMACTIVATE");
574             case LVN_ODSTATECHANGED: return TEXT("LVN_ODSTATECHANGED");
575             case LVN_HOTTRACK: return TEXT("LVN_HOTTRACK");
576             case LVN_GETDISPINFOA: return TEXT("LVN_GETDISPINFOA");
577             case LVN_GETDISPINFOW: return TEXT("LVN_GETDISPINFOW");
578             case LVN_SETDISPINFOA: return TEXT("LVN_SETDISPINFOA");
579             case LVN_SETDISPINFOW: return TEXT("LVN_SETDISPINFOW");
580             case LVN_KEYDOWN: return TEXT("LVN_KEYDOWN");
581             case LVN_MARQUEEBEGIN: return TEXT("LVN_MARQUEEBEGIN");
582             case LVN_GETINFOTIPA: return TEXT("LVN_GETINFOTIPA");
583             case LVN_GETINFOTIPW: return TEXT("LVN_GETINFOTIPW");
584             case LVN_INCREMENTALSEARCHA: return TEXT("LVN_INCREMENTALSEARCHA");
585             case LVN_INCREMENTALSEARCHW: return TEXT("LVN_INCREMENTALSEARCHW");
586 #if NTDDI_VERSION >= 0x06000000
587             case LVN_COLUMNDROPDOWN: return TEXT("LVN_COLUMNDROPDOWN");
588             case LVN_COLUMNOVERFLOWCLICK: return TEXT("LVN_COLUMNOVERFLOWCLICK");
589 #endif
590             case LVN_BEGINSCROLL: return TEXT("LVN_BEGINSCROLL");
591             case LVN_ENDSCROLL: return TEXT("LVN_ENDSCROLL");
592 #if NTDDI_VERSION >= 0x06000000
593             case LVN_LINKCLICK: return TEXT("LVN_LINKCLICK");
594             case LVN_GETEMPTYMARKUP: return TEXT("LVN_GETEMPTYMARKUP");
595 #endif
596         }
597     }
598     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_TREEVIEW) == 0)
599     {
600         switch (code)
601         {
602             case TVN_SELCHANGINGA: return TEXT("TVN_SELCHANGINGA");
603             case TVN_SELCHANGINGW: return TEXT("TVN_SELCHANGINGW");
604             case TVN_SELCHANGEDA: return TEXT("TVN_SELCHANGEDA");
605             case TVN_SELCHANGEDW: return TEXT("TVN_SELCHANGEDW");
606             case TVN_GETDISPINFOA: return TEXT("TVN_GETDISPINFOA");
607             case TVN_GETDISPINFOW: return TEXT("TVN_GETDISPINFOW");
608             case TVN_SETDISPINFOA: return TEXT("TVN_SETDISPINFOA");
609             case TVN_SETDISPINFOW: return TEXT("TVN_SETDISPINFOW");
610             case TVN_ITEMEXPANDINGA: return TEXT("TVN_ITEMEXPANDINGA");
611             case TVN_ITEMEXPANDINGW: return TEXT("TVN_ITEMEXPANDINGW");
612             case TVN_ITEMEXPANDEDA: return TEXT("TVN_ITEMEXPANDEDA");
613             case TVN_ITEMEXPANDEDW: return TEXT("TVN_ITEMEXPANDEDW");
614             case TVN_BEGINDRAGA: return TEXT("TVN_BEGINDRAGA");
615             case TVN_BEGINDRAGW: return TEXT("TVN_BEGINDRAGW");
616             case TVN_BEGINRDRAGA: return TEXT("TVN_BEGINRDRAGA");
617             case TVN_BEGINRDRAGW: return TEXT("TVN_BEGINRDRAGW");
618             case TVN_DELETEITEMA: return TEXT("TVN_DELETEITEMA");
619             case TVN_DELETEITEMW: return TEXT("TVN_DELETEITEMW");
620             case TVN_BEGINLABELEDITA: return TEXT("TVN_BEGINLABELEDITA");
621             case TVN_BEGINLABELEDITW: return TEXT("TVN_BEGINLABELEDITW");
622             case TVN_ENDLABELEDITA: return TEXT("TVN_ENDLABELEDITA");
623             case TVN_ENDLABELEDITW: return TEXT("TVN_ENDLABELEDITW");
624             case TVN_KEYDOWN: return TEXT("TVN_KEYDOWN");
625             case TVN_GETINFOTIPA: return TEXT("TVN_GETINFOTIPA");
626             case TVN_GETINFOTIPW: return TEXT("TVN_GETINFOTIPW");
627             case TVN_SINGLEEXPAND: return TEXT("TVN_SINGLEEXPAND");
628 #ifdef TVN_ITEMCHANGINGA
629             case TVN_ITEMCHANGINGA: return TEXT("TVN_ITEMCHANGINGA");
630             case TVN_ITEMCHANGINGW: return TEXT("TVN_ITEMCHANGINGW");
631             case TVN_ITEMCHANGEDA: return TEXT("TVN_ITEMCHANGEDA");
632             case TVN_ITEMCHANGEDW: return TEXT("TVN_ITEMCHANGEDW");
633             case TVN_ASYNCDRAW: return TEXT("TVN_ASYNCDRAW");
634 #endif
635         }
636     }
637 
638     StringCbPrintf(s_szText, sizeof(s_szText), TEXT("%u"), code);
639     return s_szText;
640 }
641 
642 static __inline LRESULT MSGDUMP_API
643 MD_OnNotify(HWND hwnd, int idFrom, LPNMHDR pnmhdr)
644 {
645     MSGDUMP_TPRINTF(TEXT("%sWM_NOTIFY(hwnd:%p, idFrom:%d, pnmhdr:%p, hwndFrom:%p, pnmhdr->idFrom:%d, code:%s)\n"),
646                     MSGDUMP_PREFIX, (void *)hwnd, idFrom, (void *)pnmhdr,
647                     pnmhdr->hwndFrom, pnmhdr->idFrom,
648                     MD_GetNotifyCode(pnmhdr->hwndFrom, pnmhdr->code));
649     return 0;
650 }
651 
652 static __inline void MSGDUMP_API
653 MD_OnContextMenu(HWND hwnd, HWND hwndContext, UINT xPos, UINT yPos)
654 {
655     MSGDUMP_TPRINTF(TEXT("%sWM_CONTEXTMENU(hwnd:%p, hwndContext:%p, xPos:%u, yPos:%u)\n"),
656                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndContext, xPos, yPos);
657 }
658 
659 static __inline void MSGDUMP_API
660 MD_OnDisplayChange(HWND hwnd, UINT bitsPerPixel, UINT cxScreen, UINT cyScreen)
661 {
662     MSGDUMP_TPRINTF(TEXT("%sWM_DISPLAYCHANGE(hwnd:%p, bitsPerPixel:%u, cxScreen:%u, cyScreen:%u)\n"),
663                     MSGDUMP_PREFIX, (void *)hwnd, bitsPerPixel, cxScreen, cyScreen);
664 }
665 
666 static __inline BOOL MSGDUMP_API
667 MD_OnNCCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
668 {
669     MSGDUMP_TPRINTF(TEXT("%sWM_NCCREATE(hwnd:%p, lpCreateStruct:%p)\n"),
670                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpCreateStruct);
671     return FALSE;
672 }
673 
674 static __inline void MSGDUMP_API
675 MD_OnNCDestroy(HWND hwnd)
676 {
677     MSGDUMP_TPRINTF(TEXT("%sWM_NCDESTROY(hwnd:%p)\n"),
678                     MSGDUMP_PREFIX, (void *)hwnd);
679 }
680 
681 static __inline UINT MSGDUMP_API
682 MD_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS * lpcsp)
683 {
684     MSGDUMP_TPRINTF(TEXT("%sWM_NCCALCSIZE(hwnd:%p, fCalcValidRects:%d, lpcsp:%p)\n"),
685                     MSGDUMP_PREFIX, (void *)hwnd, fCalcValidRects, (void *)lpcsp);
686     return 0;
687 }
688 
689 static __inline UINT MSGDUMP_API
690 MD_OnNCHitTest(HWND hwnd, int x, int y)
691 {
692     MSGDUMP_TPRINTF(TEXT("%sWM_NCHITTEST(hwnd:%p, x:%d, y:%d)\n"),
693                     MSGDUMP_PREFIX, (void *)hwnd, x, y);
694     return 0;
695 }
696 
697 static __inline void MSGDUMP_API
698 MD_OnNCPaint(HWND hwnd, HRGN hrgn)
699 {
700     MSGDUMP_TPRINTF(TEXT("%sWM_NCPAINT(hwnd:%p, hrgn:%p)\n"),
701                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hrgn);
702 }
703 
704 static __inline BOOL MSGDUMP_API
705 MD_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized)
706 {
707     MSGDUMP_TPRINTF(TEXT("%sWM_NCACTIVATE(hwnd:%p, fActive:%d, hwndActDeact:%p, fMinimized:%d)\n"),
708                     MSGDUMP_PREFIX, (void *)hwnd, fActive, (void *)hwndActDeact, fMinimized);
709     return FALSE;
710 }
711 
712 static __inline UINT MSGDUMP_API
713 MD_OnGetDlgCode(HWND hwnd, LPMSG lpmsg)
714 {
715     MSGDUMP_TPRINTF(TEXT("%sWM_GETDLGCODE(hwnd:%p, lpmsg:%p)\n"),
716                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpmsg);
717     return 0;
718 }
719 
720 static __inline void MSGDUMP_API
721 MD_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest)
722 {
723     MSGDUMP_TPRINTF(TEXT("%sWM_NCMOUSEMOVE(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
724                     MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
725 }
726 
727 static __inline void MSGDUMP_API
728 MD_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest)
729 {
730     if (fDoubleClick)
731     {
732         MSGDUMP_TPRINTF(TEXT("%sWM_NCLBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
733                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
734     }
735     else
736     {
737         MSGDUMP_TPRINTF(TEXT("%sWM_NCLBUTTONDOWN(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
738                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
739     }
740 }
741 
742 static __inline void MSGDUMP_API
743 MD_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest)
744 {
745     MSGDUMP_TPRINTF(TEXT("%sWM_NCLBUTTONUP(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
746                     MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
747 }
748 
749 static __inline void MSGDUMP_API
750 MD_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest)
751 {
752     if (fDoubleClick)
753     {
754         MSGDUMP_TPRINTF(TEXT("%sWM_NCRBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
755                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
756     }
757     else
758     {
759         MSGDUMP_TPRINTF(TEXT("%sWM_NCRBUTTONDOWN(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
760                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
761     }
762 }
763 
764 static __inline void MSGDUMP_API
765 MD_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest)
766 {
767     MSGDUMP_TPRINTF(TEXT("%sWM_NCRBUTTONUP(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
768                     MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
769 }
770 
771 static __inline void MSGDUMP_API
772 MD_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest)
773 {
774     if (fDoubleClick)
775     {
776         MSGDUMP_TPRINTF(TEXT("%sWM_NCMBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
777                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
778     }
779     else
780     {
781         MSGDUMP_TPRINTF(TEXT("%sWM_NCMBUTTONDOWN(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
782                        MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
783     }
784 }
785 
786 static __inline void MSGDUMP_API
787 MD_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest)
788 {
789     MSGDUMP_TPRINTF(TEXT("%sWM_NCMBUTTONUP(hwnd:%p, x:%d, y:%d, codeHitTest:%u)\n"),
790                     MSGDUMP_PREFIX, (void *)hwnd, x, y, codeHitTest);
791 }
792 
793 static __inline void MSGDUMP_API
794 MD_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
795 {
796     if (fDown)
797     {
798         MSGDUMP_TPRINTF(TEXT("%sWM_KEYDOWN(hwnd:%p, vk:%u, cRepeat:%d, flags:%u)\n"),
799                        MSGDUMP_PREFIX, (void *)hwnd, vk, cRepeat, flags);
800     }
801     else
802     {
803         MSGDUMP_TPRINTF(TEXT("%sWM_KEYUP(hwnd:%p, vk:%u, cRepeat:%d, flags:%u)\n"),
804                        MSGDUMP_PREFIX, (void *)hwnd, vk, cRepeat, flags);
805     }
806 }
807 
808 static __inline void MSGDUMP_API
809 MD_OnChar(HWND hwnd, TCHAR ch, int cRepeat)
810 {
811     MSGDUMP_TPRINTF(TEXT("%sWM_CHAR(hwnd:%p, ch:%u, cRepeat:%d)\n"),
812                     MSGDUMP_PREFIX, (void *)hwnd, ch, cRepeat);
813 }
814 
815 static __inline void MSGDUMP_API
816 MD_OnDeadChar(HWND hwnd, TCHAR ch, int cRepeat)
817 {
818     MSGDUMP_TPRINTF(TEXT("%sWM_DEADCHAR(hwnd:%p, ch:%u, cRepeat:%d)\n"),
819                     MSGDUMP_PREFIX, (void *)hwnd, ch, cRepeat);
820 }
821 
822 static __inline void MSGDUMP_API
823 MD_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
824 {
825     if (fDown)
826     {
827         MSGDUMP_TPRINTF(TEXT("%sWM_SYSKEYDOWN(hwnd:%p, vk:%u, cRepeat:%d, flags:%u)\n"),
828                        MSGDUMP_PREFIX, (void *)hwnd, vk, cRepeat, flags);
829     }
830     else
831     {
832         MSGDUMP_TPRINTF(TEXT("%sWM_SYSKEYUP(hwnd:%p, vk:%u, cRepeat:%d, flags:%u)\n"),
833                        MSGDUMP_PREFIX, (void *)hwnd, vk, cRepeat, flags);
834     }
835 }
836 
837 static __inline void MSGDUMP_API
838 MD_OnSysChar(HWND hwnd, TCHAR ch, int cRepeat)
839 {
840     MSGDUMP_TPRINTF(TEXT("%sWM_SYSCHAR(hwnd:%p, ch:%u, cRepeat:%d)\n"),
841                     MSGDUMP_PREFIX, (void *)hwnd, ch, cRepeat);
842 }
843 
844 static __inline void MSGDUMP_API
845 MD_OnSysDeadChar(HWND hwnd, TCHAR ch, int cRepeat)
846 {
847     MSGDUMP_TPRINTF(TEXT("%sWM_SYSDEADCHAR(hwnd:%p, ch:%u, cRepeat:%d)\n"),
848                     MSGDUMP_PREFIX, (void *)hwnd, ch, cRepeat);
849 }
850 
851 static __inline BOOL MSGDUMP_API
852 MD_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
853 {
854     MSGDUMP_TPRINTF(TEXT("%sWM_INITDIALOG(hwnd:%p, hwndFocus:%p, lParam:%p)\n"),
855                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndFocus, (void *)lParam);
856     return FALSE;
857 }
858 
859 static __inline void MSGDUMP_API
860 MD_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
861 {
862     MSGDUMP_TPRINTF(TEXT("%sWM_COMMAND(hwnd:%p, id:%d, hwndCtl:%p, codeNotify:%u)\n"),
863                     MSGDUMP_PREFIX, (void *)hwnd, id, (void *)hwndCtl, codeNotify);
864 }
865 
866 static __inline void MSGDUMP_API
867 MD_OnSysCommand(HWND hwnd, UINT cmd, int x, int y)
868 {
869     MSGDUMP_TPRINTF(TEXT("%sWM_SYSCOMMAND(hwnd:%p, cmd:%u, x:%d, y:%d)\n"),
870                     MSGDUMP_PREFIX, (void *)hwnd, cmd, x, y);
871 }
872 
873 static __inline void MSGDUMP_API
874 MD_OnTimer(HWND hwnd, UINT id)
875 {
876     MSGDUMP_TPRINTF(TEXT("%sWM_TIMER(hwnd:%p, id:%u)\n"),
877                     MSGDUMP_PREFIX, (void *)hwnd, id);
878 }
879 
880 static __inline void MSGDUMP_API
881 MD_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos)
882 {
883     MSGDUMP_TPRINTF(TEXT("%sWM_HSCROLL(hwnd:%p, hwndCtl:%p, code:%u, pos:%d)\n"),
884                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCtl, code, pos);
885 }
886 
887 static __inline void MSGDUMP_API
888 MD_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos)
889 {
890     MSGDUMP_TPRINTF(TEXT("%sWM_VSCROLL(hwnd:%p, hwndCtl:%p, code:%u, pos:%d)\n"),
891                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCtl, code, pos);
892 }
893 
894 static __inline void MSGDUMP_API
895 MD_OnInitMenu(HWND hwnd, HMENU hMenu)
896 {
897     MSGDUMP_TPRINTF(TEXT("%sWM_INITMENU(hwnd:%p, hMenu:%p)\n"),
898                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hMenu);
899 }
900 
901 static __inline void MSGDUMP_API
902 MD_OnInitMenuPopup(HWND hwnd, HMENU hMenu, UINT item, BOOL fSystemMenu)
903 {
904     MSGDUMP_TPRINTF(TEXT("%sWM_INITMENUPOPUP(hwnd:%p, hMenu:%p, item:%u, fSystemMenu:%d)\n"),
905                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hMenu, item, fSystemMenu);
906 }
907 
908 static __inline void MSGDUMP_API
909 MD_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags)
910 {
911     MSGDUMP_TPRINTF(TEXT("%sWM_MENUSELECT(hwnd:%p, hmenu:%p, item:%d, hmenuPopup:%p, flags:%u)\n"),
912                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hmenu, item, (void *)hmenuPopup, flags);
913 }
914 
915 static __inline DWORD MSGDUMP_API
916 MD_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu)
917 {
918     MSGDUMP_TPRINTF(TEXT("%sWM_MENUCHAR(hwnd:%p, ch:%u, flags:%u, hmenu:%p)\n"),
919                     MSGDUMP_PREFIX, (void *)hwnd, ch, flags, (void *)hmenu);
920     return 0;
921 }
922 
923 static __inline void MSGDUMP_API
924 MD_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource)
925 {
926     MSGDUMP_TPRINTF(TEXT("%sWM_ENTERIDLE(hwnd:%p, source:%u, hwndSource:%p)\n"),
927                     MSGDUMP_PREFIX, (void *)hwnd, source, (void *)hwndSource);
928 }
929 
930 static __inline HBRUSH MSGDUMP_API
931 MD_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type)
932 {
933     MSGDUMP_TPRINTF(TEXT("%sWM_CTLCOLOR(hwnd:%p, hdc:%p, hwndChild:%p, type:%d)\n"),
934                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hdc, (void *)hwndChild, type);
935     return NULL;
936 }
937 
938 static __inline void MSGDUMP_API
939 MD_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
940 {
941     MSGDUMP_TPRINTF(TEXT("%sWM_MOUSEMOVE(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
942                     MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
943 }
944 
945 static __inline void MSGDUMP_API
946 MD_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
947 {
948     if (fDoubleClick)
949     {
950         MSGDUMP_TPRINTF(TEXT("%sWM_LBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
951                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
952     }
953     else
954     {
955         MSGDUMP_TPRINTF(TEXT("%sWM_LBUTTONDOWN(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
956                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
957     }
958 }
959 
960 static __inline void MSGDUMP_API
961 MD_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags)
962 {
963     MSGDUMP_TPRINTF(TEXT("%sWM_LBUTTONUP(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
964                     MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
965 }
966 
967 static __inline void MSGDUMP_API
968 MD_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
969 {
970     if (fDoubleClick)
971     {
972         MSGDUMP_TPRINTF(TEXT("%sWM_RBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
973                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
974     }
975     else
976     {
977         MSGDUMP_TPRINTF(TEXT("%sWM_RBUTTONDOWN(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
978                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
979     }
980 }
981 
982 static __inline void MSGDUMP_API
983 MD_OnRButtonUp(HWND hwnd, int x, int y, UINT flags)
984 {
985     MSGDUMP_TPRINTF(TEXT("%sWM_RBUTTONUP(hwnd:%p, x:%d, y:%d, flags:%u)\n"),
986                     MSGDUMP_PREFIX, (void *)hwnd, x, y, flags);
987 }
988 
989 static __inline void MSGDUMP_API
990 MD_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
991 {
992     if (fDoubleClick)
993     {
994         MSGDUMP_TPRINTF(TEXT("%sWM_MBUTTONDBLCLK(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
995                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
996     }
997     else
998     {
999         MSGDUMP_TPRINTF(TEXT("%sWM_MBUTTONDOWN(hwnd:%p, x:%d, y:%d, keyFlags:%u)\n"),
1000                        MSGDUMP_PREFIX, (void *)hwnd, x, y, keyFlags);
1001     }
1002 }
1003 
1004 static __inline void MSGDUMP_API
1005 MD_OnMButtonUp(HWND hwnd, int x, int y, UINT flags)
1006 {
1007     MSGDUMP_TPRINTF(TEXT("%sWM_MBUTTONUP(hwnd:%p, x:%d, y:%d, flags:%u)\n"),
1008                     MSGDUMP_PREFIX, (void *)hwnd, x, y, flags);
1009 }
1010 
1011 static __inline void MSGDUMP_API
1012 MD_OnMouseWheel(HWND hwnd, int xPos, int yPos, int zDelta, UINT fwKeys)
1013 {
1014     MSGDUMP_TPRINTF(TEXT("%sWM_MOUSEWHEEL(hwnd:%p, xPos:%d, yPos:%d, zDelta:%d, fwKeys:%u)\n"),
1015                     MSGDUMP_PREFIX, (void *)hwnd, xPos, yPos, zDelta, fwKeys);
1016 }
1017 
1018 static __inline void MSGDUMP_API
1019 MD_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild)
1020 {
1021     MSGDUMP_TPRINTF(TEXT("%sWM_PARENTNOTIFY(hwnd:%p, msg:%u, hwndChild:%p, idChild:%d)\n"),
1022                     MSGDUMP_PREFIX, (void *)hwnd, msg, (void *)hwndChild, idChild);
1023 }
1024 
1025 static __inline BOOL MSGDUMP_API
1026 MD_OnDeviceChange(HWND hwnd, UINT uEvent, DWORD dwEventData)
1027 {
1028     MSGDUMP_TPRINTF(TEXT("%sWM_DEVICECHANGE(hwnd:%p, uEvent:%u, dwEventData:0x%08lX)\n"),
1029                     MSGDUMP_PREFIX, (void *)hwnd, uEvent, dwEventData);
1030     return FALSE;
1031 }
1032 
1033 static __inline HWND MSGDUMP_API
1034 MD_MDICreate(HWND hwnd, const LPMDICREATESTRUCT lpmcs)
1035 {
1036     MSGDUMP_TPRINTF(TEXT("%sWM_MDICREATE(hwnd:%p, lpmcs:%p)\n"),
1037                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpmcs);
1038     return NULL;
1039 }
1040 
1041 static __inline void MSGDUMP_API
1042 MD_MDIDestroy(HWND hwnd, HWND hwndDestroy)
1043 {
1044     MSGDUMP_TPRINTF(TEXT("%sWM_MDIDESTROY(hwnd:%p, hwndDestroy:%p)\n"),
1045                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndDestroy);
1046 }
1047 
1048 static __inline void MSGDUMP_API
1049 MD_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate)
1050 {
1051     MSGDUMP_TPRINTF(TEXT("%sWM_MDIACTIVATE(hwnd:%p, fActive:%d, hwndActivate:%p, hwndDeactivate:%p)\n"),
1052                     MSGDUMP_PREFIX, (void *)hwnd, fActive, (void *)hwndActivate, (void *)hwndDeactivate);
1053 }
1054 
1055 static __inline void MSGDUMP_API
1056 MD_MDIRestore(HWND hwnd, HWND hwndRestore)
1057 {
1058     MSGDUMP_TPRINTF(TEXT("%sWM_MDIRESTORE(hwnd:%p, hwndRestore:%p)\n"),
1059                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndRestore);
1060 }
1061 
1062 static __inline HWND MSGDUMP_API
1063 MD_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev)
1064 {
1065     MSGDUMP_TPRINTF(TEXT("%sWM_MDINEXT(hwnd:%p, hwndCur:%p, fPrev:%d)\n"),
1066                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCur, fPrev);
1067     return NULL;
1068 }
1069 
1070 static __inline void MSGDUMP_API
1071 MD_MDIMaximize(HWND hwnd, HWND hwndMaximize)
1072 {
1073     MSGDUMP_TPRINTF(TEXT("%sWM_MDIMAXIMIZE(hwnd:%p, hwndMaximize:%p)\n"),
1074                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndMaximize);
1075 }
1076 
1077 static __inline BOOL MSGDUMP_API
1078 MD_MDITile(HWND hwnd, UINT cmd)
1079 {
1080     MSGDUMP_TPRINTF(TEXT("%sWM_MDITILE(hwnd:%p, cmd:%u)\n"),
1081                     MSGDUMP_PREFIX, (void *)hwnd, cmd);
1082     return FALSE;
1083 }
1084 
1085 static __inline BOOL MSGDUMP_API
1086 MD_MDICascade(HWND hwnd, UINT cmd)
1087 {
1088     MSGDUMP_TPRINTF(TEXT("%sWM_MDICASCADE(hwnd:%p, cmd:%u)\n"),
1089                     MSGDUMP_PREFIX, (void *)hwnd, cmd);
1090     return FALSE;
1091 }
1092 
1093 static __inline void MSGDUMP_API
1094 MD_MDIIconArrange(HWND hwnd)
1095 {
1096     MSGDUMP_TPRINTF(TEXT("%sWM_MDIICONARRANGE(hwnd:%p)\n"),
1097                     MSGDUMP_PREFIX, (void *)hwnd);
1098 }
1099 
1100 static __inline HWND MSGDUMP_API
1101 MD_MDIGetActive(HWND hwnd)
1102 {
1103     MSGDUMP_TPRINTF(TEXT("%sWM_MDIGETACTIVE(hwnd:%p)\n"),
1104                     MSGDUMP_PREFIX, (void *)hwnd);
1105     return NULL;
1106 }
1107 
1108 #ifdef _UNDOCUSER_H
1109     static __inline LRESULT MSGDUMP_API
1110     MD_OnDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam)
1111     {
1112         MSGDUMP_TPRINTF(TEXT("%sWM_DROPOBJECT(hwnd:%p, wParam:%p, lParam:%p)\n"),
1113                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1114         return 0;
1115     }
1116 
1117     static __inline LRESULT MSGDUMP_API
1118     MD_OnQueryDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam)
1119     {
1120         MSGDUMP_TPRINTF(TEXT("%sWM_QUERYDROPOBJECT(hwnd:%p, wParam:%p, lParam:%p)\n"),
1121                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1122         return 0;
1123     }
1124 
1125     static __inline LRESULT MSGDUMP_API
1126     MD_OnBeginDrag(HWND hwnd, WPARAM wParam, LPARAM lParam)
1127     {
1128         MSGDUMP_TPRINTF(TEXT("%sWM_BEGINDRAG(hwnd:%p, wParam:%p, lParam:%p)\n"),
1129                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1130         return 0;
1131     }
1132 
1133     static __inline LRESULT MSGDUMP_API
1134     MD_OnDragLoop(HWND hwnd, WPARAM wParam, LPARAM lParam)
1135     {
1136         MSGDUMP_TPRINTF(TEXT("%sWM_DRAGLOOP(hwnd:%p, wParam:%p, lParam:%p)\n"),
1137                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1138         return 0;
1139     }
1140 
1141     static __inline LRESULT MSGDUMP_API
1142     MD_OnDragSelect(HWND hwnd, WPARAM wParam, LPARAM lParam)
1143     {
1144         MSGDUMP_TPRINTF(TEXT("%sWM_DRAGSELECT(hwnd:%p, wParam:%p, lParam:%p)\n"),
1145                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1146         return 0;
1147     }
1148 
1149     static __inline LRESULT MSGDUMP_API
1150     MD_OnDragMove(HWND hwnd, WPARAM wParam, LPARAM lParam)
1151     {
1152         MSGDUMP_TPRINTF(TEXT("%sWM_DRAGMOVE(hwnd:%p, wParam:%p, lParam:%p)\n"),
1153                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1154         return 0;
1155     }
1156 #endif
1157 
1158 static __inline HMENU MSGDUMP_API
1159 MD_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow)
1160 {
1161     MSGDUMP_TPRINTF(TEXT("%sWM_MDISETMENU(hwnd:%p, fRefresh:%d, hmenuFrame:%p, hmenuWindow:%p)\n"),
1162                     MSGDUMP_PREFIX, (void *)hwnd, fRefresh, (void *)hmenuFrame, (void *)hmenuWindow);
1163     return NULL;
1164 }
1165 
1166 static __inline void MSGDUMP_API
1167 MD_OnDropFiles(HWND hwnd, HDROP hdrop)
1168 {
1169     MSGDUMP_TPRINTF(TEXT("%sWM_DROPFILES(hwnd:%p, hdrop:%p)\n"),
1170                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hdrop);
1171 }
1172 
1173 static __inline void MSGDUMP_API
1174 MD_OnCut(HWND hwnd)
1175 {
1176     MSGDUMP_TPRINTF(TEXT("%sWM_CUT(hwnd:%p)\n"),
1177                     MSGDUMP_PREFIX, (void *)hwnd);
1178 }
1179 
1180 static __inline void MSGDUMP_API
1181 MD_OnCopy(HWND hwnd)
1182 {
1183     MSGDUMP_TPRINTF(TEXT("%sWM_COPY(hwnd:%p)\n"),
1184                     MSGDUMP_PREFIX, (void *)hwnd);
1185 }
1186 
1187 static __inline void MSGDUMP_API
1188 MD_OnPaste(HWND hwnd)
1189 {
1190     MSGDUMP_TPRINTF(TEXT("%sWM_PASTE(hwnd:%p)\n"),
1191                     MSGDUMP_PREFIX, (void *)hwnd);
1192 }
1193 
1194 static __inline void MSGDUMP_API
1195 MD_OnClear(HWND hwnd)
1196 {
1197     MSGDUMP_TPRINTF(TEXT("%sWM_CLEAR(hwnd:%p)\n"),
1198                     MSGDUMP_PREFIX, (void *)hwnd);
1199 }
1200 
1201 static __inline void MSGDUMP_API
1202 MD_OnUndo(HWND hwnd)
1203 {
1204     MSGDUMP_TPRINTF(TEXT("%sWM_UNDO(hwnd:%p)\n"),
1205                     MSGDUMP_PREFIX, (void *)hwnd);
1206 }
1207 
1208 static __inline HANDLE MSGDUMP_API
1209 MD_OnRenderFormat(HWND hwnd, UINT fmt)
1210 {
1211     MSGDUMP_TPRINTF(TEXT("%sWM_RENDERFORMAT(hwnd:%p, fmt:%u)\n"),
1212                     MSGDUMP_PREFIX, (void *)hwnd, fmt);
1213     return NULL;
1214 }
1215 
1216 static __inline void MSGDUMP_API
1217 MD_OnRenderAllFormats(HWND hwnd)
1218 {
1219     MSGDUMP_TPRINTF(TEXT("%sWM_RENDERALLFORMATS(hwnd:%p)\n"),
1220                     MSGDUMP_PREFIX, (void *)hwnd);
1221 }
1222 
1223 static __inline void MSGDUMP_API
1224 MD_OnDestroyClipboard(HWND hwnd)
1225 {
1226     MSGDUMP_TPRINTF(TEXT("%sWM_DESTROYCLIPBOARD(hwnd:%p)\n"),
1227                     MSGDUMP_PREFIX, (void *)hwnd);
1228 }
1229 
1230 static __inline void MSGDUMP_API
1231 MD_OnDrawClipboard(HWND hwnd)
1232 {
1233     MSGDUMP_TPRINTF(TEXT("%sWM_DRAWCLIPBOARD(hwnd:%p)\n"),
1234                     MSGDUMP_PREFIX, (void *)hwnd);
1235 }
1236 
1237 static __inline void MSGDUMP_API
1238 MD_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const LPPAINTSTRUCT lpPaintStruct)
1239 {
1240     MSGDUMP_TPRINTF(TEXT("%sWM_PAINTCLIPBOARD(hwnd:%p, hwndCBViewer:%p, lpPaintStruct:%p)\n"),
1241                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCBViewer, (void *)lpPaintStruct);
1242 }
1243 
1244 static __inline void MSGDUMP_API
1245 MD_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos)
1246 {
1247     MSGDUMP_TPRINTF(TEXT("%sWM_VSCROLLCLIPBOARD(hwnd:%p, hwndCBViewer:%p, code:%u, pos:%d)\n"),
1248                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCBViewer, code, pos);
1249 }
1250 
1251 static __inline void MSGDUMP_API
1252 MD_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const LPRECT lprc)
1253 {
1254     TCHAR buf[MSGDUMP_MAX_RECT_TEXT];
1255     MSGDUMP_TPRINTF(TEXT("%sWM_SIZECLIPBOARD(hwnd:%p, hwndCBViewer:%p, lprc:%s)\n"),
1256                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCBViewer,
1257                     MD_rect_text(buf, sizeof(buf), lprc));
1258 }
1259 
1260 static __inline void MSGDUMP_API
1261 MD_OnAskCBFormatName(HWND hwnd, int cchMax, LPTSTR rgchName)
1262 {
1263     MSGDUMP_TPRINTF(TEXT("%sWM_ASKCBFORMATNAME(hwnd:%p, cchMax:%d, rgchName:%p)\n"),
1264                     MSGDUMP_PREFIX, (void *)hwnd, cchMax, (void *)rgchName);
1265 }
1266 
1267 static __inline void MSGDUMP_API
1268 MD_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext)
1269 {
1270     MSGDUMP_TPRINTF(TEXT("%sWM_CHANGECBCHAIN(hwnd:%p, hwndRemove:%p, hwndNext:%p)\n"),
1271                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndRemove, (void *)hwndNext);
1272 }
1273 
1274 static __inline void MSGDUMP_API
1275 MD_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos)
1276 {
1277     MSGDUMP_TPRINTF(TEXT("%sWM_HSCROLLCLIPBOARD(hwnd:%p, hwndCBViewer:%p, code:%u, pos:%d)\n"),
1278                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndCBViewer, code, pos);
1279 }
1280 
1281 static __inline BOOL MSGDUMP_API
1282 MD_OnQueryNewPalette(HWND hwnd)
1283 {
1284     MSGDUMP_TPRINTF(TEXT("%sWM_QUERYNEWPALETTE(hwnd:%p)\n"),
1285                     MSGDUMP_PREFIX, (void *)hwnd);
1286     return FALSE;
1287 }
1288 
1289 static __inline void MSGDUMP_API
1290 MD_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange)
1291 {
1292     MSGDUMP_TPRINTF(TEXT("%sWM_PALETTEISCHANGING(hwnd:%p, hwndPaletteChange:%p)\n"),
1293                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndPaletteChange);
1294 }
1295 
1296 static __inline void MSGDUMP_API
1297 MD_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange)
1298 {
1299     MSGDUMP_TPRINTF(TEXT("%sWM_PALETTECHANGED(hwnd:%p, hwndPaletteChange:%p)\n"),
1300                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndPaletteChange);
1301 }
1302 
1303 static __inline void MSGDUMP_API
1304 MD_OnHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT vk)
1305 {
1306     MSGDUMP_TPRINTF(TEXT("%sWM_HOTKEY(hwnd:%p, idHotKey:%d, fuModifiers:%u, vk:%u)\n"),
1307                     MSGDUMP_PREFIX, (void *)hwnd, idHotKey, fuModifiers, vk);
1308 }
1309 
1310 static __inline INT MSGDUMP_API
1311 MD_OnSetHotKey(HWND hwnd, INT nCode, UINT nOptions)
1312 {
1313     MSGDUMP_TPRINTF(TEXT("%sWM_SETHOTKEY(hwnd:%p, nCode:%d, nOptions:%u)\n"),
1314                     MSGDUMP_PREFIX, (void *)hwnd, nCode, nOptions);
1315     return 0;
1316 }
1317 
1318 static __inline INT MSGDUMP_API
1319 MD_OnGetHotKey(HWND hwnd)
1320 {
1321     MSGDUMP_TPRINTF(TEXT("%sWM_GETHOTKEY(hwnd:%p)\n"),
1322                     MSGDUMP_PREFIX, (void *)hwnd);
1323     return 0;
1324 }
1325 
1326 static __inline void MSGDUMP_API
1327 MD_OnPaintIcon(HWND hwnd)
1328 {
1329     MSGDUMP_TPRINTF(TEXT("%sWM_PAINTICON(hwnd:%p)\n"),
1330                     MSGDUMP_PREFIX, (void *)hwnd);
1331 }
1332 
1333 static __inline LRESULT MSGDUMP_API
1334 MD_OnGetObject(HWND hwnd, WPARAM wParam, DWORD dwObjId)
1335 {
1336     MSGDUMP_TPRINTF(TEXT("%sWM_GETOBJECT(hwnd:%p, wParam:%p, dwObjId:0x%08lX)\n"),
1337                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, dwObjId);
1338     return 0;
1339 }
1340 
1341 static __inline void MSGDUMP_API
1342 MD_OnCancelJournal(HWND hwnd)
1343 {
1344     MSGDUMP_TPRINTF(TEXT("%sWM_CANCELJOURNAL(hwnd:%p)\n"),
1345                     MSGDUMP_PREFIX, (void *)hwnd);
1346 }
1347 
1348 static __inline void MSGDUMP_API
1349 MD_OnInputLangChangeRequest(HWND hwnd, BOOL bFlag, HKL hKL)
1350 {
1351     MSGDUMP_TPRINTF(TEXT("%sWM_INPUTLANGCHANGEREQUEST(hwnd:%p, bFlag:%d, hKL:%p)\n"),
1352                     MSGDUMP_PREFIX, (void *)hwnd, bFlag, (void *)hKL);
1353 }
1354 
1355 static __inline void MSGDUMP_API
1356 MD_OnInputLangChange(HWND hwnd, DWORD dwCharSet, HKL hKL)
1357 {
1358     MSGDUMP_TPRINTF(TEXT("%sWM_INPUTLANGCHANGE(hwnd:%p, dwCharSet:0x%08lX, hKL:%p)\n"),
1359                     MSGDUMP_PREFIX, (void *)hwnd, dwCharSet, (void *)hKL);
1360 }
1361 
1362 static __inline void MSGDUMP_API
1363 MD_OnTCard(HWND hwnd, UINT idAction, DWORD dwActionData)
1364 {
1365     MSGDUMP_TPRINTF(TEXT("%sWM_TCARD(hwnd:%p, idAction:%u, dwActionData:0x%08lX)\n"),
1366                     MSGDUMP_PREFIX, (void *)hwnd, idAction, dwActionData);
1367 }
1368 
1369 static __inline void MSGDUMP_API
1370 MD_OnHelp(HWND hwnd, LPHELPINFO lpHelpInfo)
1371 {
1372     MSGDUMP_TPRINTF(TEXT("%sWM_HELP(hwnd:%p, lpHelpInfo:%p)\n"),
1373                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpHelpInfo);
1374 }
1375 
1376 static __inline void MSGDUMP_API
1377 MD_OnUserChanged(HWND hwnd)
1378 {
1379     MSGDUMP_TPRINTF(TEXT("%sWM_USERCHANGED(hwnd:%p)\n"),
1380                     MSGDUMP_PREFIX, (void *)hwnd);
1381 }
1382 
1383 static __inline INT MSGDUMP_API
1384 MD_OnNotifyFormat(HWND hwnd, HWND hwndTarget, INT nCommand)
1385 {
1386     MSGDUMP_TPRINTF(TEXT("%sWM_NOTIFYFORMAT(hwnd:%p, hwndTarget:%p, nCommand:%d)\n"),
1387                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndTarget, nCommand);
1388     return 0;
1389 }
1390 
1391 static __inline void MSGDUMP_API
1392 MD_OnStyleChanging(HWND hwnd, UINT nStyleType, LPSTYLESTRUCT lpStyleStruct)
1393 {
1394     MSGDUMP_TPRINTF(TEXT("%sWM_STYLECHANGING(hwnd:%p, nStyleType:%u, lpStyleStruct:%p)\n"),
1395                     MSGDUMP_PREFIX, (void *)hwnd, nStyleType, (void *)lpStyleStruct);
1396 }
1397 
1398 static __inline void MSGDUMP_API
1399 MD_OnStyleChanged(HWND hwnd, UINT nStyleType, const STYLESTRUCT *lpStyleStruct)
1400 {
1401     MSGDUMP_TPRINTF(TEXT("%sWM_STYLECHANGED(hwnd:%p, nStyleType:%u, lpStyleStruct:%p)\n"),
1402                     MSGDUMP_PREFIX, (void *)hwnd, nStyleType, (void *)lpStyleStruct);
1403 }
1404 
1405 static __inline HICON MSGDUMP_API
1406 MD_OnGetIcon(HWND hwnd, UINT nType, LPARAM dpi)
1407 {
1408     MSGDUMP_TPRINTF(TEXT("%sWM_GETICON(hwnd:%p, nType:%u, dpi:%p)\n"),
1409                     MSGDUMP_PREFIX, (void *)hwnd, nType, (void *)dpi);
1410     return NULL;
1411 }
1412 
1413 static __inline HICON MSGDUMP_API
1414 MD_OnSetIcon(HWND hwnd, UINT nType, HICON hIcon)
1415 {
1416     MSGDUMP_TPRINTF(TEXT("%sWM_SETICON(hwnd:%p, nType:%u, hIcon:%p)\n"),
1417                     MSGDUMP_PREFIX, (void *)hwnd, nType, (void *)hIcon);
1418     return NULL;
1419 }
1420 
1421 static __inline void MSGDUMP_API
1422 MD_OnSyncPaint(HWND hwnd)
1423 {
1424     MSGDUMP_TPRINTF(TEXT("%sWM_SYNCPAINT(hwnd:%p)\n"),
1425                     MSGDUMP_PREFIX, (void *)hwnd);
1426 }
1427 
1428 static __inline void MSGDUMP_API
1429 MD_OnNCXButtonDown(HWND hwnd, BOOL fDoubleClick, UINT nHitTest, WORD fwButton,
1430                    INT xPos, INT yPos)
1431 {
1432     if (fDoubleClick)
1433     {
1434         MSGDUMP_TPRINTF(TEXT("%sWM_NCXBUTTONDBLCLK(hwnd:%p, nHitTest:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1435                        MSGDUMP_PREFIX, (void *)hwnd, nHitTest, fwButton, xPos, yPos);
1436     }
1437     else
1438     {
1439         MSGDUMP_TPRINTF(TEXT("%sWM_NCXBUTTONDOWN(hwnd:%p, nHitTest:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1440                        MSGDUMP_PREFIX, (void *)hwnd, nHitTest, fwButton, xPos, yPos);
1441     }
1442 }
1443 
1444 static __inline void MSGDUMP_API
1445 MD_OnNCXButtonUp(HWND hwnd, UINT nHitTest, WORD fwButton, INT xPos, INT yPos)
1446 {
1447     MSGDUMP_TPRINTF(TEXT("%sWM_NCXBUTTONUP(hwnd:%p, nHitTest:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1448                     MSGDUMP_PREFIX, (void *)hwnd, nHitTest, fwButton, xPos, yPos);
1449 }
1450 
1451 static __inline void MSGDUMP_API
1452 MD_OnImeStartComposition(HWND hwnd)
1453 {
1454     MSGDUMP_TPRINTF(TEXT("%sWM_IME_STARTCOMPOSITION(hwnd:%p)\n"),
1455                     MSGDUMP_PREFIX, (void *)hwnd);
1456 }
1457 
1458 static __inline void MSGDUMP_API
1459 MD_OnImeEndComposition(HWND hwnd)
1460 {
1461     MSGDUMP_TPRINTF(TEXT("%sWM_IME_ENDCOMPOSITION(hwnd:%p)\n"),
1462                     MSGDUMP_PREFIX, (void *)hwnd);
1463 }
1464 
1465 static __inline void MSGDUMP_API
1466 MD_OnImeComposition(HWND hwnd, WORD wChar, DWORD lAttribute)
1467 {
1468     MSGDUMP_TPRINTF(TEXT("%sWM_IME_COMPOSITION(hwnd:%p, wChar:%u, lAttribute:0x%08lX)\n"),
1469                     MSGDUMP_PREFIX, (void *)hwnd, wChar, lAttribute);
1470 }
1471 
1472 static __inline void MSGDUMP_API
1473 MD_OnMenuRButtonUp(HWND hwnd, UINT nPos, HMENU hMenu)
1474 {
1475     MSGDUMP_TPRINTF(TEXT("%sWM_MENURBUTTONUP(hwnd:%p, nPos:%u, hMenu:%p)\n"),
1476                     MSGDUMP_PREFIX, (void *)hwnd, nPos, (void *)hMenu);
1477 }
1478 
1479 static __inline UINT MSGDUMP_API
1480 MD_OnMenuDrag(HWND hwnd, UINT nPos, HMENU hMenu)
1481 {
1482     MSGDUMP_TPRINTF(TEXT("%sWM_MENUDRAG(hwnd:%p, nPos:%u, hMenu:%p)\n"),
1483                     MSGDUMP_PREFIX, (void *)hwnd, nPos, (void *)hMenu);
1484     return 0;
1485 }
1486 
1487 static __inline UINT MSGDUMP_API
1488 MD_OnMenuGetObject(HWND hwnd, MENUGETOBJECTINFO *pmgoi)
1489 {
1490     MSGDUMP_TPRINTF(TEXT("%sWM_MENUGETOBJECT(hwnd:%p, pmgoi:%p)\n"),
1491                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pmgoi);
1492     return 0;
1493 }
1494 
1495 static __inline void MSGDUMP_API
1496 MD_OnUninitMenuPopup(HWND hwnd, HMENU hMenu, UINT nFlags)
1497 {
1498     MSGDUMP_TPRINTF(TEXT("%sWM_UNINITMENUPOPUP(hwnd:%p, hMenu:%p, nFlags:%u)\n"),
1499                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hMenu, nFlags);
1500 }
1501 
1502 static __inline void MSGDUMP_API
1503 MD_OnMenuCommand(HWND hwnd, UINT nPos, HMENU hMenu)
1504 {
1505     MSGDUMP_TPRINTF(TEXT("%sWM_MENUCOMMAND(hwnd:%p, nPos:%u, hMenu:%p)\n"),
1506                     MSGDUMP_PREFIX, (void *)hwnd, nPos, (void *)hMenu);
1507 }
1508 
1509 static __inline void MSGDUMP_API
1510 MD_OnChangeUIState(HWND hwnd, UINT nAction, UINT nUIElement)
1511 {
1512     MSGDUMP_TPRINTF(TEXT("%sWM_CHANGEUISTATE(hwnd:%p, nAction:%u, nUIElement:%u)\n"),
1513                     MSGDUMP_PREFIX, (void *)hwnd, nAction, nUIElement);
1514 }
1515 
1516 static __inline void MSGDUMP_API
1517 MD_OnUpdateUIState(HWND hwnd, UINT nAction, UINT nUIElement)
1518 {
1519     MSGDUMP_TPRINTF(TEXT("%sWM_UPDATEUISTATE(hwnd:%p, nAction:%u, nUIElement:%u)\n"),
1520                     MSGDUMP_PREFIX, (void *)hwnd, nAction, nUIElement);
1521 }
1522 
1523 static __inline UINT MSGDUMP_API
1524 MD_OnQueryUIState(HWND hwnd)
1525 {
1526     MSGDUMP_TPRINTF(TEXT("%sWM_QUERYUISTATE(hwnd:%p)\n"),
1527                     MSGDUMP_PREFIX, (void *)hwnd);
1528     return 0;
1529 }
1530 
1531 static __inline void MSGDUMP_API
1532 MD_OnXButtonDown(HWND hwnd, BOOL fDoubleClick, WORD fwKeys, WORD fwButton, INT xPos, INT yPos)
1533 {
1534     if (fDoubleClick)
1535     {
1536         MSGDUMP_TPRINTF(TEXT("%sWM_XBUTTONDBLCLK(hwnd:%p, fwKeys:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1537                        MSGDUMP_PREFIX, (void *)hwnd, fwKeys, fwButton, xPos, yPos);
1538     }
1539     else
1540     {
1541         MSGDUMP_TPRINTF(TEXT("%sWM_XBUTTONDOWN(hwnd:%p, fwKeys:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1542                        MSGDUMP_PREFIX, (void *)hwnd, fwKeys, fwButton, xPos, yPos);
1543     }
1544 }
1545 
1546 static __inline void MSGDUMP_API
1547 MD_OnXButtonUp(HWND hwnd, WORD fwKeys, WORD fwButton, INT xPos, INT yPos)
1548 {
1549     MSGDUMP_TPRINTF(TEXT("%sWM_XBUTTONUP(hwnd:%p, fwKeys:%u, fwButton:%u, xPos:%d, yPos:%d)\n"),
1550                     MSGDUMP_PREFIX, (void *)hwnd, fwKeys, fwButton, xPos, yPos);
1551 }
1552 
1553 static __inline void MSGDUMP_API
1554 MD_OnEnterMenuLoop(HWND hwnd, BOOL bIsTrackPopupMenu)
1555 {
1556     MSGDUMP_TPRINTF(TEXT("%sWM_ENTERMENULOOP(hwnd:%p, bIsTrackPopupMenu:%d)\n"),
1557                     MSGDUMP_PREFIX, (void *)hwnd, bIsTrackPopupMenu);
1558 }
1559 
1560 static __inline void MSGDUMP_API
1561 MD_OnExitMenuLoop(HWND hwnd, BOOL bIsTrackPopupMenu)
1562 {
1563     MSGDUMP_TPRINTF(TEXT("%sWM_EXITMENULOOP(hwnd:%p, bIsTrackPopupMenu:%d)\n"),
1564                     MSGDUMP_PREFIX, (void *)hwnd, bIsTrackPopupMenu);
1565 }
1566 
1567 static __inline void MSGDUMP_API
1568 MD_OnNextMenu(HWND hwnd, INT nCode, LPMDINEXTMENU lpMDINextMenu)
1569 {
1570     MSGDUMP_TPRINTF(TEXT("%sWM_NEXTMENU(hwnd:%p, nCode:%d, lpMDINextMenu:%p)\n"),
1571                     MSGDUMP_PREFIX, (void *)hwnd, nCode, (void *)lpMDINextMenu);
1572 }
1573 
1574 static __inline void MSGDUMP_API
1575 MD_OnSizing(HWND hwnd, UINT nSide, LPRECT lpRect)
1576 {
1577     TCHAR buf[MSGDUMP_MAX_RECT_TEXT];
1578     MSGDUMP_TPRINTF(TEXT("%sWM_SIZING(hwnd:%p, nSide:%u, lpRect:%s)\n"),
1579                     MSGDUMP_PREFIX, (void *)hwnd, nSide, MD_rect_text(buf, sizeof(buf), lpRect));
1580 }
1581 
1582 static __inline void MSGDUMP_API
1583 MD_OnCaptureChanged(HWND hwnd, HWND hwndNewCapture)
1584 {
1585     MSGDUMP_TPRINTF(TEXT("%sWM_CAPTURECHANGED(hwnd:%p, hwndNewCapture:%p)\n"),
1586                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndNewCapture);
1587 }
1588 
1589 static __inline void MSGDUMP_API
1590 MD_OnMoving(HWND hwnd, UINT nSide, LPRECT lpRect)
1591 {
1592     TCHAR buf[MSGDUMP_MAX_RECT_TEXT];
1593     MSGDUMP_TPRINTF(TEXT("%sWM_MOVING(hwnd:%p, nSide:%u, lpRect:%s)\n"),
1594                     MSGDUMP_PREFIX, (void *)hwnd, nSide, MD_rect_text(buf, sizeof(buf), lpRect));
1595 }
1596 
1597 static __inline LRESULT MSGDUMP_API
1598 MD_OnPowerBroadcast(HWND hwnd, UINT nPowerEvent, UINT nEventData)
1599 {
1600     MSGDUMP_TPRINTF(TEXT("%sWM_POWERBROADCAST(hwnd:%p, nPowerEvent:%u, nEventData:%u)\n"),
1601                     MSGDUMP_PREFIX, (void *)hwnd, nPowerEvent, nEventData);
1602     return 0;
1603 }
1604 
1605 static __inline void MSGDUMP_API
1606 MD_OnEnterSizeMove(HWND hwnd)
1607 {
1608     MSGDUMP_TPRINTF(TEXT("%sWM_ENTERSIZEMOVE(hwnd:%p)\n"),
1609                     MSGDUMP_PREFIX, (void *)hwnd);
1610 }
1611 
1612 static __inline void MSGDUMP_API
1613 MD_OnExitSizeMove(HWND hwnd)
1614 {
1615     MSGDUMP_TPRINTF(TEXT("%sWM_EXITSIZEMOVE(hwnd:%p)\n"),
1616                     MSGDUMP_PREFIX, (void *)hwnd);
1617 }
1618 
1619 static __inline HMENU MSGDUMP_API
1620 MD_MDIRefreshMenu(HWND hwnd)
1621 {
1622     MSGDUMP_TPRINTF(TEXT("%sWM_MDIREFRESHMENU(hwnd:%p)\n"),
1623                     MSGDUMP_PREFIX, (void *)hwnd);
1624     return NULL;
1625 }
1626 
1627 static __inline BOOL MSGDUMP_API
1628 MD_OnImeSetContext(HWND hwnd, BOOL fActive, DWORD dwShow)
1629 {
1630     MSGDUMP_TPRINTF(TEXT("%sWM_IME_SETCONTEXT(hwnd:%p, fActive:%d, dwShow:0x%08lX)\n"),
1631                     MSGDUMP_PREFIX, (void *)hwnd, fActive, dwShow);
1632     return FALSE;
1633 }
1634 
1635 static __inline LRESULT MSGDUMP_API
1636 MD_OnImeNotify(HWND hwnd, WPARAM wSubMessage, LPARAM lParam)
1637 {
1638     MSGDUMP_TPRINTF(TEXT("%sWM_IME_NOTIFY(hwnd:%p, wSubMessage:%p, lParam:%p)\n"),
1639                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wSubMessage, (void *)lParam);
1640     return 0;
1641 }
1642 
1643 static __inline LRESULT MSGDUMP_API
1644 MD_OnImeControl(HWND hwnd, WPARAM wSubMessage, LPVOID lpData)
1645 {
1646     MSGDUMP_TPRINTF(TEXT("%sWM_IME_CONTROL(hwnd:%p, wSubMessage:%p, lpData:%p)\n"),
1647                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wSubMessage, (void *)lpData);
1648     return 0;
1649 }
1650 
1651 static __inline void MSGDUMP_API
1652 MD_OnImeCompositionFull(HWND hwnd)
1653 {
1654     MSGDUMP_TPRINTF(TEXT("%sWM_IME_COMPOSITIONFULL(hwnd:%p)\n"),
1655                     MSGDUMP_PREFIX, (void *)hwnd);
1656 }
1657 
1658 static __inline void MSGDUMP_API
1659 MD_OnImeSelect(HWND hwnd, BOOL fSelect, HKL hKL)
1660 {
1661     MSGDUMP_TPRINTF(TEXT("%sWM_IME_SELECT(hwnd:%p, fSelect:%d, hKL:%p)\n"),
1662                     MSGDUMP_PREFIX, (void *)hwnd, fSelect, (void *)hKL);
1663 }
1664 
1665 static __inline void MSGDUMP_API
1666 MD_OnImeChar(HWND hwnd, WORD wCharCode, LONG lKeyData)
1667 {
1668     MSGDUMP_TPRINTF(TEXT("%sWM_IME_CHAR(hwnd:%p, wCharCode:%u, lKeyData:%ld)\n"),
1669                     MSGDUMP_PREFIX, (void *)hwnd, wCharCode, lKeyData);
1670 }
1671 
1672 static __inline LRESULT MSGDUMP_API
1673 MD_OnImeRequest(HWND hwnd, WPARAM wParam, LPARAM lParam)
1674 {
1675     MSGDUMP_TPRINTF(TEXT("%sWM_IME_REQUEST(hwnd:%p, wParam:%p, lParam:%p)\n"),
1676                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
1677     return 0;
1678 }
1679 
1680 static __inline void MSGDUMP_API
1681 MD_OnImeKey(HWND hwnd, BOOL fDown, UINT nVirtKey, LONG lKeyData)
1682 {
1683     if (fDown)
1684     {
1685         MSGDUMP_TPRINTF(TEXT("%sWM_IME_KEYDOWN(hwnd:%p, nVirtKey:%u, lKeyData:%ld)\n"),
1686                        MSGDUMP_PREFIX, (void *)hwnd, nVirtKey, lKeyData);
1687     }
1688     else
1689     {
1690         MSGDUMP_TPRINTF(TEXT("%sWM_IME_KEYUP(hwnd:%p, nVirtKey:%u, lKeyData:%ld)\n"),
1691                        MSGDUMP_PREFIX, (void *)hwnd, nVirtKey, lKeyData);
1692     }
1693 }
1694 
1695 static __inline void MSGDUMP_API
1696 MD_OnMouseHover(HWND hwnd, UINT nFlags, INT xPos, INT yPos)
1697 {
1698     MSGDUMP_TPRINTF(TEXT("%sWM_MOUSEHOVER(hwnd:%p, nFlags:%u, xPos:%d, yPos:%d)\n"),
1699                     MSGDUMP_PREFIX, (void *)hwnd, nFlags, xPos, yPos);
1700 }
1701 
1702 static __inline void MSGDUMP_API
1703 MD_OnMouseLeave(HWND hwnd)
1704 {
1705     MSGDUMP_TPRINTF(TEXT("%sWM_MOUSELEAVE(hwnd:%p)\n"),
1706                     MSGDUMP_PREFIX, (void *)hwnd);
1707 }
1708 
1709 static __inline void MSGDUMP_API
1710 MD_OnNCMouseHover(HWND hwnd, UINT nHitTest, INT xPos, INT yPos)
1711 {
1712     MSGDUMP_TPRINTF(TEXT("%sWM_NCMOUSEHOVER(hwnd:%p, nHitTest:%u, xPos:%d, yPos:%d)\n"),
1713                     MSGDUMP_PREFIX, (void *)hwnd, nHitTest, xPos, yPos);
1714 }
1715 
1716 static __inline void MSGDUMP_API
1717 MD_OnNCMouseLeave(HWND hwnd)
1718 {
1719     MSGDUMP_TPRINTF(TEXT("%sWM_NCMOUSELEAVE(hwnd:%p)\n"),
1720                     MSGDUMP_PREFIX, (void *)hwnd);
1721 }
1722 
1723 static __inline void MSGDUMP_API
1724 MD_OnPrint(HWND hwnd, HDC hDC, UINT uFlags)
1725 {
1726     MSGDUMP_TPRINTF(TEXT("%sWM_PRINT(hwnd:%p, hDC:%p, uFlags:%u)\n"),
1727                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hDC, uFlags);
1728 }
1729 
1730 static __inline void MSGDUMP_API
1731 MD_OnPrintClient(HWND hwnd, HDC hDC, UINT uFlags)
1732 {
1733     MSGDUMP_TPRINTF(TEXT("%sWM_PRINTCLIENT(hwnd:%p, hDC:%p, uFlags:%u)\n"),
1734                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hDC, uFlags);
1735 }
1736 
1737 static __inline BOOL MSGDUMP_API
1738 MD_OnAppCommand(HWND hwnd, HWND hwndTarget, UINT cmd, UINT nDevice, UINT nKey)
1739 {
1740     MSGDUMP_TPRINTF(TEXT("%sWM_APPCOMMAND(hwnd:%p, hwndTarget:%p, cmd:%u, nDevice:%u, nKey:%u)\n"),
1741                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndTarget, cmd, nDevice, nKey);
1742     return FALSE;
1743 }
1744 
1745 static __inline LONG MSGDUMP_API
1746 MD_Edit_OnGetSel(HWND hwnd, LPDWORD lpdwStart, LPDWORD lpdwEnd)
1747 {
1748     MSGDUMP_TPRINTF(TEXT("%sEM_GETSEL(hwnd:%p, lpdwStart:%p, lpdwEnd:%p)\n"),
1749                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpdwStart, (void *)lpdwEnd);
1750     return 0;
1751 }
1752 
1753 static __inline void MSGDUMP_API
1754 MD_Edit_OnSetSel(HWND hwnd, INT nStart, INT nEnd)
1755 {
1756     MSGDUMP_TPRINTF(TEXT("%sEM_SETSEL(hwnd:%p, nStart:%d, nEnd:%d)\n"),
1757                     MSGDUMP_PREFIX, (void *)hwnd, nStart, nEnd);
1758 }
1759 
1760 static __inline void MSGDUMP_API
1761 MD_Edit_OnGetRect(HWND hwnd, LPRECT prc)
1762 {
1763     MSGDUMP_TPRINTF(TEXT("%sEM_GETRECT(hwnd:%p, prc:%p)\n"),
1764                     MSGDUMP_PREFIX, (void *)hwnd, (void *)prc);
1765 }
1766 
1767 static __inline void MSGDUMP_API
1768 MD_Edit_OnSetRect(HWND hwnd, LPCRECT prc)
1769 {
1770     TCHAR buf[MSGDUMP_MAX_RECT_TEXT];
1771     MSGDUMP_TPRINTF(TEXT("%sEM_SETRECT(hwnd:%p, prc:%s)\n"),
1772                     MSGDUMP_PREFIX, (void *)hwnd, MD_rect_text(buf, sizeof(buf), prc));
1773 }
1774 
1775 static __inline void MSGDUMP_API
1776 MD_Edit_OnSetRectNP(HWND hwnd, LPCRECT prc)
1777 {
1778     TCHAR buf[MSGDUMP_MAX_RECT_TEXT];
1779     MSGDUMP_TPRINTF(TEXT("%sEM_SETRECTNP(hwnd:%p, prc:%s)\n"),
1780                     MSGDUMP_PREFIX, (void *)hwnd, MD_rect_text(buf, sizeof(buf), prc));
1781 }
1782 
1783 static __inline DWORD MSGDUMP_API
1784 MD_Edit_OnScroll(HWND hwnd, INT nScroll)
1785 {
1786     MSGDUMP_TPRINTF(TEXT("%sEM_SCROLL(hwnd:%p, nScroll:%d)\n"),
1787                     MSGDUMP_PREFIX, (void *)hwnd, nScroll);
1788     return 0;
1789 }
1790 
1791 static __inline BOOL MSGDUMP_API
1792 MD_Edit_OnLineScroll(HWND hwnd, INT cxScroll, INT cyScroll)
1793 {
1794     MSGDUMP_TPRINTF(TEXT("%sEM_LINESCROLL(hwnd:%p, cxScroll:%d, cyScroll:%d)\n"),
1795                     MSGDUMP_PREFIX, (void *)hwnd, cxScroll, cyScroll);
1796     return FALSE;
1797 }
1798 
1799 static __inline BOOL MSGDUMP_API
1800 MD_Edit_OnScrollCaret(HWND hwnd)
1801 {
1802     MSGDUMP_TPRINTF(TEXT("%sEM_SCROLLCARET(hwnd:%p)\n"),
1803                     MSGDUMP_PREFIX, (void *)hwnd);
1804     return FALSE;
1805 }
1806 
1807 static __inline BOOL MSGDUMP_API
1808 MD_Edit_OnGetModify(HWND hwnd)
1809 {
1810     MSGDUMP_TPRINTF(TEXT("%sEM_GETMODIFY(hwnd:%p)\n"),
1811                     MSGDUMP_PREFIX, (void *)hwnd);
1812     return FALSE;
1813 }
1814 
1815 static __inline void MSGDUMP_API
1816 MD_Edit_OnSetModify(HWND hwnd, BOOL fModified)
1817 {
1818     MSGDUMP_TPRINTF(TEXT("%sEM_SETMODIFY(hwnd:%p, fModified:%d)\n"),
1819                     MSGDUMP_PREFIX, (void *)hwnd, fModified);
1820 }
1821 
1822 static __inline INT MSGDUMP_API
1823 MD_Edit_OnGetLineCount(HWND hwnd)
1824 {
1825     MSGDUMP_TPRINTF(TEXT("%sEM_GETLINECOUNT(hwnd:%p)\n"),
1826                     MSGDUMP_PREFIX, (void *)hwnd);
1827     return 0;
1828 }
1829 
1830 static __inline INT MSGDUMP_API
1831 MD_Edit_OnLineIndex(HWND hwnd, INT line)
1832 {
1833     MSGDUMP_TPRINTF(TEXT("%sEM_LINEINDEX(hwnd:%p, line:%d)\n"),
1834                     MSGDUMP_PREFIX, (void *)hwnd, line);
1835     return 0;
1836 }
1837 
1838 static __inline void MSGDUMP_API
1839 MD_Edit_OnSetHandle(HWND hwnd, HLOCAL hloc)
1840 {
1841     MSGDUMP_TPRINTF(TEXT("%sEM_SETHANDLE(hwnd:%p, hloc:%p)\n"),
1842                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hloc);
1843 }
1844 
1845 static __inline HLOCAL MSGDUMP_API
1846 MD_Edit_OnGetHandle(HWND hwnd)
1847 {
1848     MSGDUMP_TPRINTF(TEXT("%sEM_GETHANDLE(hwnd:%p)\n"),
1849                     MSGDUMP_PREFIX, (void *)hwnd);
1850     return NULL;
1851 }
1852 
1853 static __inline INT MSGDUMP_API
1854 MD_Edit_OnGetThumb(HWND hwnd)
1855 {
1856     MSGDUMP_TPRINTF(TEXT("%sEM_GETTHUMB(hwnd:%p)\n"),
1857                     MSGDUMP_PREFIX, (void *)hwnd);
1858     return 0;
1859 }
1860 
1861 static __inline INT MSGDUMP_API
1862 MD_Edit_OnLineLength(HWND hwnd, INT ich)
1863 {
1864     MSGDUMP_TPRINTF(TEXT("%sEM_LINELENGTH(hwnd:%p, ich:%d)\n"),
1865                     MSGDUMP_PREFIX, (void *)hwnd, ich);
1866     return 0;
1867 }
1868 
1869 static __inline void MSGDUMP_API
1870 MD_Edit_OnReplaceSel(HWND hwnd, BOOL fCanUndo, LPCTSTR lpszReplace)
1871 {
1872     if (IsWindowUnicode(hwnd))
1873         MSGDUMP_TPRINTF(TEXT("%sEM_REPLACESEL(hwnd:%p, fCanUndo:%d, %ls)\n"),
1874                         MSGDUMP_PREFIX, (void *)hwnd, fCanUndo, (LPCWSTR)lpszReplace);
1875     else
1876         MSGDUMP_TPRINTF(TEXT("%sEM_REPLACESEL(hwnd:%p, fCanUndo:%d, %hs)\n"),
1877                         MSGDUMP_PREFIX, (void *)hwnd, fCanUndo, (LPCSTR)lpszReplace);
1878 }
1879 
1880 static __inline INT MSGDUMP_API
1881 MD_Edit_OnGetLine(HWND hwnd, INT line, LPCTSTR lpch)
1882 {
1883     if (IsWindowUnicode(hwnd))
1884         MSGDUMP_TPRINTF(TEXT("%sEM_GETLINE(hwnd:%p, line:%d, lpch:%ls)\n"),
1885                         MSGDUMP_PREFIX, (void *)hwnd, line, (LPCWSTR)lpch);
1886     else
1887         MSGDUMP_TPRINTF(TEXT("%sEM_GETLINE(hwnd:%p, line:%d, lpch:%hs)\n"),
1888                         MSGDUMP_PREFIX, (void *)hwnd, line, (LPCSTR)lpch);
1889     return 0;
1890 }
1891 
1892 static __inline BOOL MSGDUMP_API
1893 MD_Edit_OnCanUndo(HWND hwnd)
1894 {
1895     MSGDUMP_TPRINTF(TEXT("%sEM_CANUNDO(hwnd:%p)\n"),
1896                     MSGDUMP_PREFIX, (void *)hwnd);
1897     return FALSE;
1898 }
1899 
1900 static __inline BOOL MSGDUMP_API
1901 MD_Edit_OnUndo(HWND hwnd)
1902 {
1903     MSGDUMP_TPRINTF(TEXT("%sEM_UNDO(hwnd:%p)\n"),
1904                     MSGDUMP_PREFIX, (void *)hwnd);
1905     return FALSE;
1906 }
1907 
1908 static __inline BOOL MSGDUMP_API
1909 MD_Edit_OnFmtLines(HWND hwnd, BOOL fAddEOL)
1910 {
1911     MSGDUMP_TPRINTF(TEXT("%sEM_UNDO(hwnd:%p, fAddEOL:%d)\n"),
1912                     MSGDUMP_PREFIX, (void *)hwnd, fAddEOL);
1913     return FALSE;
1914 }
1915 
1916 static __inline INT MSGDUMP_API
1917 MD_Edit_OnLineFromChar(HWND hwnd, INT ich)
1918 {
1919     MSGDUMP_TPRINTF(TEXT("%sEM_LINEFROMCHAR(hwnd:%p, ich:%d)\n"),
1920                     MSGDUMP_PREFIX, (void *)hwnd, ich);
1921     return 0;
1922 }
1923 
1924 static __inline BOOL MSGDUMP_API
1925 MD_Edit_OnSetTabStops(HWND hwnd, INT cTabs, LPDWORD lpdwTabs)
1926 {
1927     MSGDUMP_TPRINTF(TEXT("%sEM_SETTABSTOPS(hwnd:%p, cTabs:%d, lpdwTabs:%p)\n"),
1928                     MSGDUMP_PREFIX, (void *)hwnd, cTabs, (void *)lpdwTabs);
1929     return FALSE;
1930 }
1931 
1932 static __inline void MSGDUMP_API
1933 MD_Edit_OnSetPasswordChar(HWND hwnd, UINT ch)
1934 {
1935     MSGDUMP_TPRINTF(TEXT("%sEM_SETPASSWORDCHAR(hwnd:%p, ch:%u)\n"),
1936                     MSGDUMP_PREFIX, (void *)hwnd, ch);
1937 }
1938 
1939 static __inline void MSGDUMP_API
1940 MD_Edit_OnEmptyUndoBuffer(HWND hwnd)
1941 {
1942     MSGDUMP_TPRINTF(TEXT("%sEM_EMPTYUNDOBUFFER(hwnd:%p)\n"),
1943                     MSGDUMP_PREFIX, (void *)hwnd);
1944 }
1945 
1946 static __inline INT MSGDUMP_API
1947 MD_Edit_OnGetFirstVisibleLine(HWND hwnd)
1948 {
1949     MSGDUMP_TPRINTF(TEXT("%sEM_GETFIRSTVISIBLELINE(hwnd:%p)\n"),
1950                     MSGDUMP_PREFIX, (void *)hwnd);
1951     return 0;
1952 }
1953 
1954 static __inline BOOL MSGDUMP_API
1955 MD_Edit_OnSetReadOnly(HWND hwnd, BOOL fReadOnly)
1956 {
1957     MSGDUMP_TPRINTF(TEXT("%sEM_SETREADONLY(hwnd:%p, fReadOnly:%d)\n"),
1958                     MSGDUMP_PREFIX, (void *)hwnd, fReadOnly);
1959     return FALSE;
1960 }
1961 
1962 static __inline void MSGDUMP_API
1963 MD_Edit_OnSetWordBreakProc(HWND hwnd, EDITWORDBREAKPROC ewbprc)
1964 {
1965     MSGDUMP_TPRINTF(TEXT("%sEM_SETWORDBREAKPROC(hwnd:%p, ewbprc:%p)\n"),
1966                     MSGDUMP_PREFIX, (void *)hwnd, *(void **)&ewbprc);
1967 }
1968 
1969 static __inline EDITWORDBREAKPROC MSGDUMP_API
1970 MD_Edit_OnGetWordBreakProc(HWND hwnd)
1971 {
1972     MSGDUMP_TPRINTF(TEXT("%sEM_GETWORDBREAKPROC(hwnd:%p)\n"),
1973                     MSGDUMP_PREFIX, (void *)hwnd);
1974     return NULL;
1975 }
1976 
1977 static __inline UINT MSGDUMP_API
1978 MD_Edit_OnGetPasswordChar(HWND hwnd)
1979 {
1980     MSGDUMP_TPRINTF(TEXT("%sEM_GETPASSWORDCHAR(hwnd:%p)\n"),
1981                     MSGDUMP_PREFIX, (void *)hwnd);
1982     return 0;
1983 }
1984 
1985 static __inline void MSGDUMP_API
1986 MD_Edit_OnSetMargins(HWND hwnd, UINT fwMargin, WORD wLeft, WORD wRight)
1987 {
1988     MSGDUMP_TPRINTF(TEXT("%sEM_SETMARGINS(hwnd:%p, fwMargin:%u, wLeft:%d, wRight:%d)\n"),
1989                     MSGDUMP_PREFIX, (void *)hwnd, fwMargin, wLeft, wRight);
1990 }
1991 
1992 static __inline DWORD MSGDUMP_API
1993 MD_Edit_OnGetMargins(HWND hwnd)
1994 {
1995     MSGDUMP_TPRINTF(TEXT("%sEM_GETMARGINS(hwnd:%p)\n"),
1996                     MSGDUMP_PREFIX, (void *)hwnd);
1997     return 0;
1998 }
1999 
2000 static __inline void MSGDUMP_API
2001 MD_Edit_OnSetLimitText(HWND hwnd, DWORD cbMax)
2002 {
2003     MSGDUMP_TPRINTF(TEXT("%sEM_SETLIMITTEXT(hwnd:%p, cbMax:%ld)\n"),
2004                     MSGDUMP_PREFIX, (void *)hwnd, cbMax);
2005 }
2006 
2007 static __inline DWORD MSGDUMP_API
2008 MD_Edit_OnGetLimitText(HWND hwnd)
2009 {
2010     MSGDUMP_TPRINTF(TEXT("%sEM_GETLIMITTEXT(hwnd:%p)\n"),
2011                     MSGDUMP_PREFIX, (void *)hwnd);
2012     return 0;
2013 }
2014 
2015 static __inline void MSGDUMP_API
2016 MD_Edit_OnPosFromChar(HWND hwnd, LPPOINT lpPoint, UINT wCharIndex)
2017 {
2018     MSGDUMP_TPRINTF(TEXT("%sEM_POSFROMCHAR(hwnd:%p, lpPoint:%p, wCharIndex:%u)\n"),
2019                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpPoint, wCharIndex);
2020 }
2021 
2022 static __inline LONG MSGDUMP_API
2023 MD_Edit_OnCharFromPos(HWND hwnd, INT x, INT y)
2024 {
2025     MSGDUMP_TPRINTF(TEXT("%sEM_CHARFROMPOS(hwnd:%p, x:%d, y:%d)\n"),
2026                     MSGDUMP_PREFIX, (void *)hwnd, x, y);
2027     return 0;
2028 }
2029 
2030 static __inline DWORD MSGDUMP_API
2031 MD_Edit_OnSetIMEStatus(HWND hwnd, UINT uType, DWORD dwFlags)
2032 {
2033     MSGDUMP_TPRINTF(TEXT("%sEM_SETIMESTATUS(hwnd:%p, uType:%u, dwFlags:0x%08lX)\n"),
2034                     MSGDUMP_PREFIX, (void *)hwnd, uType, dwFlags);
2035     return 0;
2036 }
2037 
2038 static __inline DWORD MSGDUMP_API
2039 MD_Edit_OnGetIMEStatus(HWND hwnd, UINT uType)
2040 {
2041     MSGDUMP_TPRINTF(TEXT("%sEM_SETIMESTATUS(hwnd:%p, uType:%u)\n"),
2042                     MSGDUMP_PREFIX, (void *)hwnd, uType);
2043     return 0;
2044 }
2045 
2046 static __inline HICON MSGDUMP_API
2047 MD_Static_OnSetIcon(HWND hwnd, HICON hIcon)
2048 {
2049     MSGDUMP_TPRINTF(TEXT("%sSTM_SETICON(hwnd:%p, hIcon:%p)\n"),
2050                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hIcon);
2051     return NULL;
2052 }
2053 
2054 static __inline HICON MSGDUMP_API
2055 MD_Static_OnGetIcon(HWND hwnd)
2056 {
2057 
2058     MSGDUMP_TPRINTF(TEXT("%sSTM_SETICON(hwnd:%p)\n"),
2059                     MSGDUMP_PREFIX, (void *)hwnd);
2060     return NULL;
2061 }
2062 
2063 static __inline HANDLE MSGDUMP_API
2064 MD_Static_OnSetImage(HWND hwnd, UINT fImageType, HANDLE hImage)
2065 {
2066     MSGDUMP_TPRINTF(TEXT("%sSTM_SETIMAGE(hwnd:%p, fImageType:%u, hImage:%p)\n"),
2067                     MSGDUMP_PREFIX, (void *)hwnd, fImageType, (void *)hImage);
2068     return NULL;
2069 }
2070 
2071 static __inline HANDLE MSGDUMP_API
2072 MD_Static_OnGetImage(HWND hwnd, UINT fImageType)
2073 {
2074     MSGDUMP_TPRINTF(TEXT("%sSTM_GETIMAGE(hwnd:%p, fImageType:%u)\n"),
2075                     MSGDUMP_PREFIX, (void *)hwnd, fImageType);
2076     return NULL;
2077 }
2078 
2079 static __inline INT MSGDUMP_API
2080 MD_ListBox_OnAddString(HWND hwnd, LPCTSTR lpsz)
2081 {
2082     if (IsWindowUnicode(hwnd))
2083         MSGDUMP_TPRINTF(TEXT("%sLB_ADDSTRING(hwnd:%p, lpsz:%ls)\n"),
2084                         MSGDUMP_PREFIX, (void *)hwnd, (LPCWSTR)lpsz);
2085     else
2086         MSGDUMP_TPRINTF(TEXT("%sLB_ADDSTRING(hwnd:%p, lpsz:%hs)\n"),
2087                         MSGDUMP_PREFIX, (void *)hwnd, (LPCSTR)lpsz);
2088     return 0;
2089 }
2090 
2091 static __inline INT MSGDUMP_API
2092 MD_ListBox_OnInsertString(HWND hwnd, INT index, LPCTSTR lpsz)
2093 {
2094     if (IsWindowUnicode(hwnd))
2095         MSGDUMP_TPRINTF(TEXT("%sLB_INSERTSTRING(hwnd:%p, index:%d, lpsz:%ls)\n"),
2096                         MSGDUMP_PREFIX, (void *)hwnd, index, (LPCWSTR)lpsz);
2097     else
2098         MSGDUMP_TPRINTF(TEXT("%sLB_INSERTSTRING(hwnd:%p, index:%d, lpsz:%hs)\n"),
2099                         MSGDUMP_PREFIX, (void *)hwnd, index, (LPCSTR)lpsz);
2100     return 0;
2101 }
2102 
2103 static __inline INT MSGDUMP_API
2104 MD_ListBox_OnDeleteString(HWND hwnd, INT index)
2105 {
2106     MSGDUMP_TPRINTF(TEXT("%sLB_DELETESTRING(hwnd:%p, index:%d)\n"),
2107                     MSGDUMP_PREFIX, (void *)hwnd, index);
2108     return 0;
2109 }
2110 
2111 static __inline INT MSGDUMP_API
2112 MD_ListBox_OnSelItemRangeEx(HWND hwnd, UINT wFirst, UINT wLast)
2113 {
2114     MSGDUMP_TPRINTF(TEXT("%sLB_SELITEMRANGEEX(hwnd:%p, wFirst:%u, wLast:%u)\n"),
2115                     MSGDUMP_PREFIX, (void *)hwnd, wFirst, wLast);
2116     return 0;
2117 }
2118 
2119 static __inline void MSGDUMP_API
2120 MD_ListBox_OnResetContent(HWND hwnd)
2121 {
2122     MSGDUMP_TPRINTF(TEXT("%sLB_RESETCONTENT(hwnd:%p)\n"),
2123                     MSGDUMP_PREFIX, (void *)hwnd);
2124 }
2125 
2126 static __inline INT MSGDUMP_API
2127 MD_ListBox_OnSetSel(HWND hwnd, BOOL fSelect, UINT index)
2128 {
2129     MSGDUMP_TPRINTF(TEXT("%sLB_SETSEL(hwnd:%p, fSelect:%d, index:%u)\n"),
2130                     MSGDUMP_PREFIX, (void *)hwnd, fSelect, index);
2131     return 0;
2132 }
2133 
2134 static __inline INT MSGDUMP_API
2135 MD_ListBox_OnSetCurSel(HWND hwnd, INT index)
2136 {
2137     MSGDUMP_TPRINTF(TEXT("%sLB_SETCURSEL(hwnd:%p, index:%d)\n"),
2138                     MSGDUMP_PREFIX, (void *)hwnd, index);
2139     return 0;
2140 }
2141 
2142 static __inline INT MSGDUMP_API
2143 MD_ListBox_OnGetSel(HWND hwnd, INT index)
2144 {
2145     MSGDUMP_TPRINTF(TEXT("%sLB_GETSEL(hwnd:%p, index:%d)\n"),
2146                     MSGDUMP_PREFIX, (void *)hwnd, index);
2147     return 0;
2148 }
2149 
2150 static __inline INT MSGDUMP_API
2151 MD_ListBox_OnGetCurSel(HWND hwnd)
2152 {
2153     MSGDUMP_TPRINTF(TEXT("%sLB_GETCURSEL(hwnd:%p)\n"),
2154                     MSGDUMP_PREFIX, (void *)hwnd);
2155     return 0;
2156 }
2157 
2158 static __inline INT MSGDUMP_API
2159 MD_ListBox_OnGetText(HWND hwnd, INT index, LPTSTR lpszBuffer)
2160 {
2161     MSGDUMP_TPRINTF(TEXT("%sLB_GETTEXT(hwnd:%p, lpszBuffer:%p)\n"),
2162                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpszBuffer);
2163     return 0;
2164 }
2165 
2166 static __inline INT MSGDUMP_API
2167 MD_ListBox_OnGetTextLen(HWND hwnd, INT index)
2168 {
2169     MSGDUMP_TPRINTF(TEXT("%sLB_GETTEXTLEN(hwnd:%p, index:%d)\n"),
2170                     MSGDUMP_PREFIX, (void *)hwnd, index);
2171     return 0;
2172 }
2173 
2174 static __inline INT MSGDUMP_API
2175 MD_ListBox_OnGetCount(HWND hwnd)
2176 {
2177     MSGDUMP_TPRINTF(TEXT("%sLB_GETCOUNT(hwnd:%p)\n"),
2178                     MSGDUMP_PREFIX, (void *)hwnd);
2179     return 0;
2180 }
2181 
2182 static __inline INT MSGDUMP_API
2183 MD_ListBox_OnSelectString(HWND hwnd, INT indexStart, LPCTSTR lpszFind)
2184 {
2185     if (IsWindowUnicode(hwnd))
2186         MSGDUMP_TPRINTF(TEXT("%sLB_SELECTSTRING(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2187                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszFind);
2188     else
2189         MSGDUMP_TPRINTF(TEXT("%sLB_SELECTSTRING(hwnd:%p, indexStart:%d, lpszFind:%hs)\n"),
2190                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszFind);
2191     return 0;
2192 }
2193 
2194 static __inline INT MSGDUMP_API
2195 MD_ListBox_OnDir(HWND hwnd, UINT uAttrs, LPCTSTR lpszFileSpec)
2196 {
2197     if (IsWindowUnicode(hwnd))
2198         MSGDUMP_TPRINTF(TEXT("%sLB_DIR(hwnd:%p, uAttrs:%u, lpszFileSpec:%ls)\n"),
2199                         MSGDUMP_PREFIX, (void *)hwnd, uAttrs, (LPCWSTR)lpszFileSpec);
2200     else
2201         MSGDUMP_TPRINTF(TEXT("%sLB_DIR(hwnd:%p, uAttrs:%u, lpszFileSpec:%hs)\n"),
2202                         MSGDUMP_PREFIX, (void *)hwnd, uAttrs, (LPCSTR)lpszFileSpec);
2203     return 0;
2204 }
2205 
2206 static __inline INT MSGDUMP_API
2207 MD_ListBox_OnGetTopIndex(HWND hwnd)
2208 {
2209     MSGDUMP_TPRINTF(TEXT("%sLB_DIR(hwnd:%p)\n"),
2210                     MSGDUMP_PREFIX, (void *)hwnd);
2211     return 0;
2212 }
2213 
2214 static __inline INT MSGDUMP_API
2215 MD_ListBox_OnFindString(HWND hwnd, INT indexStart, LPCTSTR lpszFind)
2216 {
2217     if (IsWindowUnicode(hwnd))
2218         MSGDUMP_TPRINTF(TEXT("%sLB_FINDSTRING(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2219                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszFind);
2220     else
2221         MSGDUMP_TPRINTF(TEXT("%sLB_FINDSTRING(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2222                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszFind);
2223     return 0;
2224 }
2225 
2226 static __inline INT MSGDUMP_API
2227 MD_ListBox_OnGetSelCount(HWND hwnd)
2228 {
2229     MSGDUMP_TPRINTF(TEXT("%sLB_GETSELCOUNT(hwnd:%p)\n"),
2230                     MSGDUMP_PREFIX, (void *)hwnd);
2231     return 0;
2232 }
2233 
2234 static __inline INT MSGDUMP_API
2235 MD_ListBox_OnGetSelItems(HWND hwnd, UINT cItems, LPINT lpnItems)
2236 {
2237     MSGDUMP_TPRINTF(TEXT("%sLB_GETSELITEMS(hwnd:%p, cItems:%u, lpnItems:%p)\n"),
2238                     MSGDUMP_PREFIX, (void *)hwnd, cItems, (void *)lpnItems);
2239     return 0;
2240 }
2241 
2242 static __inline BOOL MSGDUMP_API
2243 MD_ListBox_OnSetTabStops(HWND hwnd, UINT cTabs, LPINT lpnTabs)
2244 {
2245     MSGDUMP_TPRINTF(TEXT("%sLB_SETTABSTOPS(hwnd:%p, cTabs:%u, lpnTabs:%p)\n"),
2246                     MSGDUMP_PREFIX, (void *)hwnd, cTabs, (void *)lpnTabs);
2247     return FALSE;
2248 }
2249 
2250 static __inline INT MSGDUMP_API
2251 MD_ListBox_OnGetHorizontalExtent(HWND hwnd)
2252 {
2253     MSGDUMP_TPRINTF(TEXT("%sLB_GETHORIZONTALEXTENT(hwnd:%p)\n"),
2254                     MSGDUMP_PREFIX, (void *)hwnd);
2255     return 0;
2256 }
2257 
2258 static __inline void MSGDUMP_API
2259 MD_ListBox_OnSetHorizontalExtent(HWND hwnd, INT cxExtent)
2260 {
2261     MSGDUMP_TPRINTF(TEXT("%sLB_SETHORIZONTALEXTENT(hwnd:%p, cxExtent:%d)\n"),
2262                     MSGDUMP_PREFIX, (void *)hwnd, cxExtent);
2263 }
2264 
2265 static __inline void MSGDUMP_API
2266 MD_ListBox_OnSetColumnWidth(HWND hwnd, INT cxColumn)
2267 {
2268     MSGDUMP_TPRINTF(TEXT("%sLB_SETCOLUMNWIDTH(hwnd:%p, cxColumn:%d)\n"),
2269                     MSGDUMP_PREFIX, (void *)hwnd, cxColumn);
2270 }
2271 
2272 static __inline INT MSGDUMP_API
2273 MD_ListBox_OnAddFile(HWND hwnd, LPCTSTR lpszFilename)
2274 {
2275     if (IsWindowUnicode(hwnd))
2276         MSGDUMP_TPRINTF(TEXT("%sLB_ADDFILE(hwnd:%p, lpszFilename:%ls)\n"),
2277                         MSGDUMP_PREFIX, (void *)hwnd, (LPCWSTR)lpszFilename);
2278     else
2279         MSGDUMP_TPRINTF(TEXT("%sLB_ADDFILE(hwnd:%p, lpszFilename:%ls)\n"),
2280                         MSGDUMP_PREFIX, (void *)hwnd, (LPCSTR)lpszFilename);
2281     return 0;
2282 }
2283 
2284 static __inline INT MSGDUMP_API
2285 MD_ListBox_OnSetTopIndex(HWND hwnd, INT index)
2286 {
2287     MSGDUMP_TPRINTF(TEXT("%sLB_SETTOPINDEX(hwnd:%p, index:%d)\n"),
2288                     MSGDUMP_PREFIX, (void *)hwnd, index);
2289     return 0;
2290 }
2291 
2292 static __inline INT MSGDUMP_API
2293 MD_ListBox_OnGetItemRect(HWND hwnd, INT index, RECT FAR *lprc)
2294 {
2295     MSGDUMP_TPRINTF(TEXT("%sLB_GETITEMRECT(hwnd:%p, index:%d, lprc:%p)\n"),
2296                     MSGDUMP_PREFIX, (void *)hwnd, index, (void *)lprc);
2297     return 0;
2298 }
2299 
2300 static __inline INT_PTR MSGDUMP_API
2301 MD_ListBox_OnGetItemData(HWND hwnd, INT index)
2302 {
2303     MSGDUMP_TPRINTF(TEXT("%sLB_GETITEMDATA(hwnd:%p, index:%d)\n"),
2304                     MSGDUMP_PREFIX, (void *)hwnd, index);
2305     return 0;
2306 }
2307 
2308 static __inline INT_PTR MSGDUMP_API
2309 MD_ListBox_OnSetItemData(HWND hwnd, INT index, LPARAM dwData)
2310 {
2311     MSGDUMP_TPRINTF(TEXT("%sLB_SETITEMDATA(hwnd:%p, index:%d, dwData:%p)\n"),
2312                     MSGDUMP_PREFIX, (void *)hwnd, index, (void *)dwData);
2313     return 0;
2314 }
2315 
2316 static __inline INT MSGDUMP_API
2317 MD_ListBox_OnSelItemRange(HWND hwnd, BOOL fSelect, UINT wFirst, UINT wLast)
2318 {
2319     MSGDUMP_TPRINTF(TEXT("%sLB_SELITEMRANGE(hwnd:%p, fSelect:%d, wFirst:%u, wLast:%u)\n"),
2320                     MSGDUMP_PREFIX, (void *)hwnd, fSelect, wFirst, wLast);
2321     return 0;
2322 }
2323 
2324 static __inline INT MSGDUMP_API
2325 MD_ListBox_OnSetAnchorIndex(HWND hwnd, INT index)
2326 {
2327     MSGDUMP_TPRINTF(TEXT("%sLB_SETANCHORINDEX(hwnd:%p, index:%d)\n"),
2328                     MSGDUMP_PREFIX, (void *)hwnd, index);
2329     return 0;
2330 }
2331 
2332 static __inline INT MSGDUMP_API
2333 MD_ListBox_OnGetAnchorIndex(HWND hwnd)
2334 {
2335     MSGDUMP_TPRINTF(TEXT("%sLB_GETANCHORINDEX(hwnd:%p)\n"),
2336                     MSGDUMP_PREFIX, (void *)hwnd);
2337     return 0;
2338 }
2339 
2340 static __inline INT MSGDUMP_API
2341 MD_ListBox_OnSetCaretIndex(HWND hwnd, INT index, BOOL fScroll)
2342 {
2343     MSGDUMP_TPRINTF(TEXT("%sLB_SETCARETINDEX(hwnd:%p, index:%d, fScroll:%d)\n"),
2344                     MSGDUMP_PREFIX, (void *)hwnd, index, fScroll);
2345     return 0;
2346 }
2347 
2348 static __inline INT MSGDUMP_API
2349 MD_ListBox_OnGetCaretIndex(HWND hwnd)
2350 {
2351     MSGDUMP_TPRINTF(TEXT("%sLB_GETCARETINDEX(hwnd:%p)\n"),
2352                     MSGDUMP_PREFIX, (void *)hwnd);
2353     return 0;
2354 }
2355 
2356 static __inline INT MSGDUMP_API
2357 MD_ListBox_OnSetItemHeight(HWND hwnd, INT index, INT cyItem)
2358 {
2359     MSGDUMP_TPRINTF(TEXT("%sLB_SETITEMHEIGHT(hwnd:%p, index:%d, cyItem:%d)\n"),
2360                     MSGDUMP_PREFIX, (void *)hwnd, index, cyItem);
2361     return 0;
2362 }
2363 
2364 static __inline INT MSGDUMP_API
2365 MD_ListBox_OnGetItemHeight(HWND hwnd, INT index)
2366 {
2367     MSGDUMP_TPRINTF(TEXT("%sLB_GETITEMHEIGHT(hwnd:%p, index:%d)\n"),
2368                     MSGDUMP_PREFIX, (void *)hwnd, index);
2369     return 0;
2370 }
2371 
2372 static __inline INT MSGDUMP_API
2373 MD_ListBox_OnFindStringExact(HWND hwnd, INT indexStart, LPCTSTR lpszFind)
2374 {
2375     if (IsWindowUnicode(hwnd))
2376         MSGDUMP_TPRINTF(TEXT("%sLB_FINDSTRINGEXACT(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2377                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszFind);
2378     else
2379         MSGDUMP_TPRINTF(TEXT("%sLB_FINDSTRINGEXACT(hwnd:%p, indexStart:%d, lpszFind:%hs)\n"),
2380                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszFind);
2381     return 0;
2382 }
2383 
2384 static __inline LCID MSGDUMP_API
2385 MD_ListBox_OnSetLocale(HWND hwnd, LCID wLocaleID)
2386 {
2387     MSGDUMP_TPRINTF(TEXT("%sLB_SETLOCALE(hwnd:%p, wLocaleID:0x%08X)\n"),
2388                     MSGDUMP_PREFIX, (void *)hwnd, wLocaleID);
2389     return 0;
2390 }
2391 
2392 static __inline LCID MSGDUMP_API
2393 MD_ListBox_OnGetLocale(HWND hwnd)
2394 {
2395     MSGDUMP_TPRINTF(TEXT("%sLB_GETLOCALE(hwnd:%p)\n"),
2396                     MSGDUMP_PREFIX, (void *)hwnd);
2397     return 0;
2398 }
2399 
2400 static __inline INT MSGDUMP_API
2401 MD_ListBox_OnSetCount(HWND hwnd, INT cItems)
2402 {
2403     MSGDUMP_TPRINTF(TEXT("%sLB_SETCOUNT(hwnd:%p, cItems:%d)\n"),
2404                     MSGDUMP_PREFIX, (void *)hwnd, cItems);
2405     return 0;
2406 }
2407 
2408 static __inline DWORD MSGDUMP_API
2409 MD_ListBox_OnInitStorage(HWND hwnd, UINT cItems, DWORD cb)
2410 {
2411     MSGDUMP_TPRINTF(TEXT("%sLB_INITSTORAGE(hwnd:%p, cItems:%d, cb:%lu)\n"),
2412                     MSGDUMP_PREFIX, (void *)hwnd, cItems, cb);
2413     return 0;
2414 }
2415 
2416 static __inline DWORD MSGDUMP_API
2417 MD_ListBox_OnItemFromPoint(HWND hwnd, INT xPos, INT yPos)
2418 {
2419     MSGDUMP_TPRINTF(TEXT("%sLB_ITEMFROMPOINT(hwnd:%p, xPos:%d, yPos:%d)\n"),
2420                     MSGDUMP_PREFIX, (void *)hwnd, xPos, yPos);
2421     return 0;
2422 }
2423 
2424 static __inline DWORD MSGDUMP_API
2425 MD_ComboBox_OnGetEditSel(HWND hwnd, LPDWORD lpdwStart, LPDWORD lpdwEnd)
2426 {
2427     MSGDUMP_TPRINTF(TEXT("%sCB_GETEDITSEL(hwnd:%p, lpdwStart:%p, lpdwEnd:%p)\n"),
2428                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpdwStart, (void *)lpdwEnd);
2429     return 0;
2430 }
2431 
2432 static __inline void MSGDUMP_API
2433 MD_ComboBox_OnLimitText(HWND hwnd, UINT cchLimit)
2434 {
2435     MSGDUMP_TPRINTF(TEXT("%sCB_LIMITTEXT(hwnd:%p, cchLimit:%u)\n"),
2436                     MSGDUMP_PREFIX, (void *)hwnd, cchLimit);
2437 }
2438 
2439 static __inline INT MSGDUMP_API
2440 MD_ComboBox_OnSetEditSel(HWND hwnd, INT ichStart, INT ichEnd)
2441 {
2442     MSGDUMP_TPRINTF(TEXT("%sCB_SETEDITSEL(hwnd:%p, ichStart:%d, ichEnd:%d)\n"),
2443                     MSGDUMP_PREFIX, (void *)hwnd, ichStart, ichEnd);
2444     return 0;
2445 }
2446 
2447 static __inline INT MSGDUMP_API
2448 MD_ComboBox_OnAddString(HWND hwnd, LPCTSTR lpsz)
2449 {
2450     if (IsWindowUnicode(hwnd))
2451         MSGDUMP_TPRINTF(TEXT("%sCB_ADDSTRING(hwnd:%p, lpsz:%ls)\n"),
2452                         MSGDUMP_PREFIX, (void *)hwnd, (LPCWSTR)lpsz);
2453     else
2454         MSGDUMP_TPRINTF(TEXT("%sCB_ADDSTRING(hwnd:%p, lpsz:%hs)\n"),
2455                         MSGDUMP_PREFIX, (void *)hwnd, (LPCSTR)lpsz);
2456     return 0;
2457 }
2458 
2459 static __inline INT MSGDUMP_API
2460 MD_ComboBox_OnDeleteString(HWND hwnd, INT index)
2461 {
2462     MSGDUMP_TPRINTF(TEXT("%sCB_DELETESTRING(hwnd:%p, index:%d)\n"),
2463                     MSGDUMP_PREFIX, (void *)hwnd, index);
2464     return 0;
2465 }
2466 
2467 static __inline INT MSGDUMP_API
2468 MD_ComboBox_OnDir(HWND hwnd, UINT uAttrs, LPCTSTR lpszFileSpec)
2469 {
2470     if (IsWindowUnicode(hwnd))
2471         MSGDUMP_TPRINTF(TEXT("%sCB_DIR(hwnd:%p, uAttrs:%u, lpszFileSpec:%ls)\n"),
2472                         MSGDUMP_PREFIX, (void *)hwnd, uAttrs, (LPCWSTR)lpszFileSpec);
2473     else
2474         MSGDUMP_TPRINTF(TEXT("%sCB_DIR(hwnd:%p, uAttrs:%u, lpszFileSpec:%ls)\n"),
2475                         MSGDUMP_PREFIX, (void *)hwnd, uAttrs, (LPCSTR)lpszFileSpec);
2476     return 0;
2477 }
2478 
2479 static __inline INT MSGDUMP_API
2480 MD_ComboBox_OnGetCount(HWND hwnd)
2481 {
2482     MSGDUMP_TPRINTF(TEXT("%sCB_GETCOUNT(hwnd:%p)\n"),
2483                     MSGDUMP_PREFIX, (void *)hwnd);
2484     return 0;
2485 }
2486 
2487 static __inline INT MSGDUMP_API
2488 MD_ComboBox_GetCurSel(HWND hwnd)
2489 {
2490     MSGDUMP_TPRINTF(TEXT("%sCB_GETCURSEL(hwnd:%p)\n"),
2491                     MSGDUMP_PREFIX, (void *)hwnd);
2492     return 0;
2493 }
2494 
2495 static __inline INT MSGDUMP_API
2496 MD_ComboBox_GetLBText(HWND hwnd, INT index, LPTSTR lpszBuffer)
2497 {
2498     MSGDUMP_TPRINTF(TEXT("%sCB_GETLBTEXT(hwnd:%p, index:%d, lpszBuffer:%p)\n"),
2499                     MSGDUMP_PREFIX, (void *)hwnd, index, (void *)lpszBuffer);
2500     return 0;
2501 }
2502 
2503 static __inline INT MSGDUMP_API
2504 MD_ComboBox_OnGetLBTextLen(HWND hwnd, INT index)
2505 {
2506     MSGDUMP_TPRINTF(TEXT("%sCB_GETLBTEXTLEN(hwnd:%p, index:%d)\n"),
2507                     MSGDUMP_PREFIX, (void *)hwnd, index);
2508     return 0;
2509 }
2510 
2511 static __inline INT MSGDUMP_API
2512 MD_ComboBox_OnInsertString(HWND hwnd, INT index, LPCTSTR lpsz)
2513 {
2514     if (IsWindowUnicode(hwnd))
2515         MSGDUMP_TPRINTF(TEXT("%sCB_INSERTSTRING(hwnd:%p, index:%d, lpsz:%ls)\n"),
2516                         MSGDUMP_PREFIX, (void *)hwnd, index, (LPCWSTR)lpsz);
2517     else
2518         MSGDUMP_TPRINTF(TEXT("%sCB_INSERTSTRING(hwnd:%p, index:%d, lpsz:%hs)\n"),
2519                         MSGDUMP_PREFIX, (void *)hwnd, index, (LPCSTR)lpsz);
2520     return 0;
2521 }
2522 
2523 static __inline void MSGDUMP_API
2524 MD_ComboBox_OnResetContent(HWND hwnd)
2525 {
2526     MSGDUMP_TPRINTF(TEXT("%sCB_RESETCONTENT(hwnd:%p)\n"),
2527                     MSGDUMP_PREFIX, (void *)hwnd);
2528 }
2529 
2530 static __inline INT MSGDUMP_API
2531 MD_ComboBox_OnFindString(HWND hwnd, INT indexStart, LPCTSTR lpszFind)
2532 {
2533     if (IsWindowUnicode(hwnd))
2534         MSGDUMP_TPRINTF(TEXT("%sCB_FINDSTRING(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2535                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszFind);
2536     else
2537         MSGDUMP_TPRINTF(TEXT("%sCB_FINDSTRING(hwnd:%p, indexStart:%d, lpszFind:%hs)\n"),
2538                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszFind);
2539     return 0;
2540 }
2541 
2542 static __inline INT MSGDUMP_API
2543 MD_ComboBox_OnSelectString(HWND hwnd, INT indexStart, LPCTSTR lpszSelect)
2544 {
2545     if (IsWindowUnicode(hwnd))
2546         MSGDUMP_TPRINTF(TEXT("%sCB_SELECTSTRING(hwnd:%p, indexStart:%d, lpszSelect:%ls)\n"),
2547                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszSelect);
2548     else
2549         MSGDUMP_TPRINTF(TEXT("%sCB_SELECTSTRING(hwnd:%p, indexStart:%d, lpszSelect:%hs)\n"),
2550                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszSelect);
2551     return 0;
2552 }
2553 
2554 static __inline INT MSGDUMP_API
2555 MD_ComboBox_OnSetCurSel(HWND hwnd, INT index)
2556 {
2557     MSGDUMP_TPRINTF(TEXT("%sCB_SETCURSEL(hwnd:%p, index:%d)\n"),
2558                     MSGDUMP_PREFIX, (void *)hwnd, index);
2559     return 0;
2560 }
2561 
2562 static __inline BOOL MSGDUMP_API
2563 MD_ComboBox_OnShowDropDown(HWND hwnd, BOOL fShow)
2564 {
2565     MSGDUMP_TPRINTF(TEXT("%sCB_SHOWDROPDOWN(hwnd:%p, fShow:%d)\n"),
2566                     MSGDUMP_PREFIX, (void *)hwnd, fShow);
2567     return FALSE;
2568 }
2569 
2570 static __inline INT_PTR MSGDUMP_API
2571 MD_ComboBox_OnGetItemData(HWND hwnd, INT index)
2572 {
2573     MSGDUMP_TPRINTF(TEXT("%sCB_GETITEMDATA(hwnd:%p, index:%d)\n"),
2574                     MSGDUMP_PREFIX, (void *)hwnd, index);
2575     return 0;
2576 }
2577 
2578 static __inline INT_PTR MSGDUMP_API
2579 MD_ComboBox_OnSetItemData(HWND hwnd, INT index, DWORD_PTR dwData)
2580 {
2581     MSGDUMP_TPRINTF(TEXT("%sCB_SETITEMDATA(hwnd:%p, index:%d, dwData:%p)\n"),
2582                     MSGDUMP_PREFIX, (void *)hwnd, index, (void *)dwData);
2583     return 0;
2584 }
2585 
2586 static __inline void MSGDUMP_API
2587 MD_ComboBox_OnGetDroppedControlRect(HWND hwnd, RECT FAR *lprc)
2588 {
2589     MSGDUMP_TPRINTF(TEXT("%sCB_GETDROPPEDCONTROLRECT(hwnd:%p, lprc:%p)\n"),
2590                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lprc);
2591 }
2592 
2593 static __inline INT MSGDUMP_API
2594 MD_ComboBox_OnSetItemHeight(HWND hwnd, INT index, INT height)
2595 {
2596     MSGDUMP_TPRINTF(TEXT("%sCB_SETITEMHEIGHT(hwnd:%p, index:%d, height:%d)\n"),
2597                     MSGDUMP_PREFIX, (void *)hwnd, index, height);
2598     return 0;
2599 }
2600 
2601 static __inline INT MSGDUMP_API
2602 MD_ComboBox_OnGetItemHeight(HWND hwnd, INT index)
2603 {
2604     MSGDUMP_TPRINTF(TEXT("%sCB_SETITEMHEIGHT(hwnd:%p, index:%d)\n"),
2605                     MSGDUMP_PREFIX, (void *)hwnd, index);
2606     return 0;
2607 }
2608 
2609 static __inline INT MSGDUMP_API
2610 MD_ComboBox_OnSetExtendedUI(HWND hwnd, BOOL fExtended)
2611 {
2612     MSGDUMP_TPRINTF(TEXT("%sCB_SETEXTENDEDUI(hwnd:%p, fExtended:%d)\n"),
2613                     MSGDUMP_PREFIX, (void *)hwnd, fExtended);
2614     return 0;
2615 }
2616 
2617 static __inline BOOL MSGDUMP_API
2618 MD_ComboBox_OnGetExtendedUI(HWND hwnd)
2619 {
2620     MSGDUMP_TPRINTF(TEXT("%sCB_SETEXTENDEDUI(hwnd:%p)\n"),
2621                     MSGDUMP_PREFIX, (void *)hwnd);
2622     return FALSE;
2623 }
2624 
2625 static __inline BOOL MSGDUMP_API
2626 MD_ComboBox_OnGetDroppedState(HWND hwnd)
2627 {
2628     MSGDUMP_TPRINTF(TEXT("%sCB_GETDROPPEDSTATE(hwnd:%p)\n"),
2629                     MSGDUMP_PREFIX, (void *)hwnd);
2630     return FALSE;
2631 }
2632 
2633 static __inline INT MSGDUMP_API
2634 MD_ComboBox_OnFindStringExact(HWND hwnd, INT indexStart, LPCTSTR lpszFind)
2635 {
2636     if (IsWindowUnicode(hwnd))
2637         MSGDUMP_TPRINTF(TEXT("%sCB_FINDSTRINGEXACT(hwnd:%p, indexStart:%d, lpszFind:%ls)\n"),
2638                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCWSTR)lpszFind);
2639     else
2640         MSGDUMP_TPRINTF(TEXT("%sCB_FINDSTRINGEXACT(hwnd:%p, indexStart:%d, lpszFind:%hs)\n"),
2641                         MSGDUMP_PREFIX, (void *)hwnd, indexStart, (LPCSTR)lpszFind);
2642     return 0;
2643 }
2644 
2645 static __inline LCID MSGDUMP_API
2646 MD_ComboBox_OnSetLocale(HWND hwnd, LCID wLocaleID)
2647 {
2648     MSGDUMP_TPRINTF(TEXT("%sCB_SETLOCALE(hwnd:%p, wLocaleID:0x%08lX)\n"),
2649                     MSGDUMP_PREFIX, (void *)hwnd, wLocaleID);
2650     return 0;
2651 }
2652 
2653 static __inline LCID MSGDUMP_API
2654 MD_ComboBox_OnGetLocale(HWND hwnd)
2655 {
2656     MSGDUMP_TPRINTF(TEXT("%sCB_GETLOCALE(hwnd:%p, wLocaleID:0x%08lX)\n"),
2657                     MSGDUMP_PREFIX, (void *)hwnd);
2658     return 0;
2659 }
2660 
2661 static __inline INT MSGDUMP_API
2662 MD_ComboBox_OnGetTopIndex(HWND hwnd)
2663 {
2664     MSGDUMP_TPRINTF(TEXT("%sCB_GETTOPINDEX(hwnd:%p)\n"),
2665                     MSGDUMP_PREFIX, (void *)hwnd);
2666     return 0;
2667 }
2668 
2669 static __inline INT MSGDUMP_API
2670 MD_ComboBox_OnSetTopIndex(HWND hwnd, INT index)
2671 {
2672     MSGDUMP_TPRINTF(TEXT("%sCB_SETTOPINDEX(hwnd:%p, index:%d)\n"),
2673                     MSGDUMP_PREFIX, (void *)hwnd, index);
2674     return 0;
2675 }
2676 
2677 static __inline INT MSGDUMP_API
2678 MD_ComboBox_OnGetHorizontalExtent(HWND hwnd)
2679 {
2680     MSGDUMP_TPRINTF(TEXT("%sCB_GETHORIZONTALEXTENT(hwnd:%p)\n"),
2681                     MSGDUMP_PREFIX, (void *)hwnd);
2682     return 0;
2683 }
2684 
2685 static __inline void MSGDUMP_API
2686 MD_ComboBox_OnSetHorizontalExtent(HWND hwnd, INT cxExtent)
2687 {
2688     MSGDUMP_TPRINTF(TEXT("%sCB_SETHORIZONTALEXTENT(hwnd:%p, cxExtent:%d)\n"),
2689                     MSGDUMP_PREFIX, (void *)hwnd, cxExtent);
2690 }
2691 
2692 static __inline INT MSGDUMP_API
2693 MD_ComboBox_OnGetDroppedWidth(HWND hwnd)
2694 {
2695     MSGDUMP_TPRINTF(TEXT("%sCB_GETDROPPEDWIDTH(hwnd:%p)\n"),
2696                     MSGDUMP_PREFIX, (void *)hwnd);
2697     return 0;
2698 }
2699 
2700 static __inline INT MSGDUMP_API
2701 MD_ComboBox_OnSetDroppedWidth(HWND hwnd, INT wWidth)
2702 {
2703     MSGDUMP_TPRINTF(TEXT("%sCB_SETDROPPEDWIDTH(hwnd:%p, wWidth:%d)\n"),
2704                     MSGDUMP_PREFIX, (void *)hwnd, wWidth);
2705     return 0;
2706 }
2707 
2708 static __inline INT MSGDUMP_API
2709 MD_ComboBox_OnInitStorage(HWND hwnd, INT cItems, DWORD cb)
2710 {
2711     MSGDUMP_TPRINTF(TEXT("%sCB_INITSTORAGE(hwnd:%p, cItems:%d, cb:%lu)\n"),
2712                     MSGDUMP_PREFIX, (void *)hwnd, cItems, cb);
2713     return 0;
2714 }
2715 
2716 static __inline INT MSGDUMP_API
2717 MD_ScrollBar_OnSetPos(HWND hwnd, INT nPos, BOOL fRedraw)
2718 {
2719     MSGDUMP_TPRINTF(TEXT("%sSBM_SETPOS(hwnd:%p, nPos:%d, fRedraw:%d)\n"),
2720                     MSGDUMP_PREFIX, (void *)hwnd, nPos, fRedraw);
2721     return 0;
2722 }
2723 
2724 static __inline INT MSGDUMP_API
2725 MD_ScrollBar_OnGetPos(HWND hwnd)
2726 {
2727     MSGDUMP_TPRINTF(TEXT("%sSBM_GETPOS(hwnd:%p)\n"),
2728                     MSGDUMP_PREFIX, (void *)hwnd);
2729     return 0;
2730 }
2731 
2732 static __inline INT MSGDUMP_API
2733 MD_ScrollBar_OnSetRange(HWND hwnd, INT nMinPos, INT nMaxPos)
2734 {
2735     MSGDUMP_TPRINTF(TEXT("%sSBM_SETRANGE(hwnd:%p, nMinPos:%d, nMaxPos:%d)\n"),
2736                     MSGDUMP_PREFIX, (void *)hwnd, nMinPos, nMaxPos);
2737     return 0;
2738 }
2739 
2740 static __inline INT MSGDUMP_API
2741 MD_ScrollBar_OnSetRangeRedraw(HWND hwnd, INT nMinPos, INT nMaxPos)
2742 {
2743     MSGDUMP_TPRINTF(TEXT("%sSBM_SETRANGEREDRAW(hwnd:%p, nMinPos:%d, nMaxPos:%d)\n"),
2744                     MSGDUMP_PREFIX, (void *)hwnd, nMinPos, nMaxPos);
2745     return 0;
2746 }
2747 
2748 static __inline void MSGDUMP_API
2749 MD_ScrollBar_OnGetRange(HWND hwnd, LPINT lpnMinPos, LPINT lpnMaxPos)
2750 {
2751     MSGDUMP_TPRINTF(TEXT("%sSBM_SETRANGEREDRAW(hwnd:%p, lpnMinPos:%p, lpnMaxPos:%p)\n"),
2752                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpnMinPos, (void *)lpnMaxPos);
2753 }
2754 
2755 static __inline BOOL MSGDUMP_API
2756 MD_ScrollBar_OnEnableArrows(HWND hwnd, UINT fuArrowFlags)
2757 {
2758     MSGDUMP_TPRINTF(TEXT("%sSBM_ENABLE_ARROWS(hwnd:%p, fuArrowFlags:%u)\n"),
2759                     MSGDUMP_PREFIX, (void *)hwnd, fuArrowFlags);
2760     return FALSE;
2761 }
2762 
2763 static __inline INT MSGDUMP_API
2764 MD_ScrollBar_OnSetScrollInfo(HWND hwnd, BOOL fRedraw, LPSCROLLINFO lpsi)
2765 {
2766     MSGDUMP_TPRINTF(TEXT("%sSBM_SETSCROLLINFO(hwnd:%p, fRedraw:%d, lpsi:%p)\n"),
2767                     MSGDUMP_PREFIX, (void *)hwnd, fRedraw, (void *)lpsi);
2768     return 0;
2769 }
2770 
2771 static __inline BOOL MSGDUMP_API
2772 MD_ScrollBar_OnGetScrollInfo(HWND hwnd, LPSCROLLINFO lpsi)
2773 {
2774     MSGDUMP_TPRINTF(TEXT("%sSBM_GETSCROLLINFO(hwnd:%p, lpsi:%p)\n"),
2775                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsi);
2776     return FALSE;
2777 }
2778 
2779 static __inline BOOL MSGDUMP_API
2780 MD_ScrollBar_OnGetScrollBarInfo(HWND hwnd, LPSCROLLBARINFO lpsbi)
2781 {
2782     MSGDUMP_TPRINTF(TEXT("%sSBM_GETSCROLLBARINFO(hwnd:%p, lpsbi:%p)\n"),
2783                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsbi);
2784     return FALSE;
2785 }
2786 
2787 static __inline COLORREF MSGDUMP_API
2788 MD_ListView_OnGetBkColor(HWND hwnd)
2789 {
2790     MSGDUMP_TPRINTF(TEXT("%sLVM_GETBKCOLOR(hwnd:%p)\n"),
2791                     MSGDUMP_PREFIX, (void *)hwnd);
2792     return 0;
2793 }
2794 
2795 static __inline BOOL MSGDUMP_API
2796 MD_ListView_OnSetBkColor(HWND hwnd, COLORREF clrBk)
2797 {
2798     MSGDUMP_TPRINTF(TEXT("%sLVM_SETBKCOLOR(hwnd:%p, clrBk:0x%08lX)\n"),
2799                     MSGDUMP_PREFIX, (void *)hwnd, clrBk);
2800     return FALSE;
2801 }
2802 
2803 static __inline HIMAGELIST MSGDUMP_API
2804 MD_ListView_OnGetImageList(HWND hwnd, INT iImageList)
2805 {
2806     MSGDUMP_TPRINTF(TEXT("%sLVM_GETIMAGELIST(hwnd:%p, iImageList:%d)\n"),
2807                     MSGDUMP_PREFIX, (void *)hwnd, iImageList);
2808     return NULL;
2809 }
2810 
2811 static __inline HIMAGELIST MSGDUMP_API
2812 MD_ListView_OnSetImageList(HWND hwnd, INT iImageList, HIMAGELIST himl)
2813 {
2814     MSGDUMP_TPRINTF(TEXT("%sLVM_SETIMAGELIST(hwnd:%p, iImageList:%d, himl:%p)\n"),
2815                     MSGDUMP_PREFIX, (void *)hwnd, iImageList, (void *)himl);
2816     return NULL;
2817 }
2818 
2819 static __inline INT MSGDUMP_API
2820 MD_ListView_OnGetItemCount(HWND hwnd)
2821 {
2822     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMCOUNT(hwnd:%p)\n"),
2823                     MSGDUMP_PREFIX, (void *)hwnd);
2824     return 0;
2825 }
2826 
2827 static __inline BOOL MSGDUMP_API
2828 MD_ListView_OnGetItemA(HWND hwnd, LV_ITEMA *pitem)
2829 {
2830     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMA(hwnd:%p, pitem:%p)\n"),
2831                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
2832     return FALSE;
2833 }
2834 
2835 static __inline BOOL MSGDUMP_API
2836 MD_ListView_OnSetItemA(HWND hwnd, const LV_ITEMA *pitem)
2837 {
2838     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMA(hwnd:%p, pitem:%p)\n"),
2839                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
2840     return FALSE;
2841 }
2842 
2843 static __inline INT MSGDUMP_API
2844 MD_ListView_OnInsertItemA(HWND hwnd, const LV_ITEMA *pitem)
2845 {
2846     MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTITEMA(hwnd:%p, pitem:%p)\n"),
2847                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
2848     return 0;
2849 }
2850 
2851 static __inline BOOL MSGDUMP_API
2852 MD_ListView_OnDeleteItem(HWND hwnd, INT i)
2853 {
2854     MSGDUMP_TPRINTF(TEXT("%sLVM_DELETEITEM(hwnd:%p, i:%d)\n"),
2855                     MSGDUMP_PREFIX, (void *)hwnd, i);
2856     return FALSE;
2857 }
2858 
2859 static __inline BOOL MSGDUMP_API
2860 MD_ListView_OnDeleteAllItems(HWND hwnd)
2861 {
2862     MSGDUMP_TPRINTF(TEXT("%sLVM_DELETEALLITEMS(hwnd:%p)\n"),
2863                     MSGDUMP_PREFIX, (void *)hwnd);
2864     return FALSE;
2865 }
2866 
2867 static __inline BOOL MSGDUMP_API
2868 MD_ListView_OnGetCallbackMask(HWND hwnd)
2869 {
2870     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCALLBACKMASK(hwnd:%p)\n"),
2871                     MSGDUMP_PREFIX, (void *)hwnd);
2872     return FALSE;
2873 }
2874 
2875 static __inline BOOL MSGDUMP_API
2876 MD_ListView_OnSetCallbackMask(HWND hwnd, UINT mask)
2877 {
2878     MSGDUMP_TPRINTF(TEXT("%sLVM_SETCALLBACKMASK(hwnd:%p, mask:%u)\n"),
2879                     MSGDUMP_PREFIX, (void *)hwnd, mask);
2880     return FALSE;
2881 }
2882 
2883 static __inline INT MSGDUMP_API
2884 MD_ListView_OnGetNextItem(HWND hwnd, INT i, UINT flags)
2885 {
2886     MSGDUMP_TPRINTF(TEXT("%sLVM_GETNEXTITEM(hwnd:%p, i:%d, flags:%u)\n"),
2887                     MSGDUMP_PREFIX, (void *)hwnd, i, flags);
2888     return 0;
2889 }
2890 
2891 static __inline INT MSGDUMP_API
2892 MD_ListView_OnFindItemA(HWND hwnd, INT iStart, const LV_FINDINFOA *plvfi)
2893 {
2894     MSGDUMP_TPRINTF(TEXT("%sLVM_FINDITEMA(hwnd:%p, iStart:%d, plvfi:%p)\n"),
2895                     MSGDUMP_PREFIX, (void *)hwnd, iStart, (void *)plvfi);
2896     return 0;
2897 }
2898 
2899 static __inline BOOL MSGDUMP_API
2900 MD_ListView_OnGetItemRect(HWND hwnd, INT i, RECT *prc)
2901 {
2902     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMRECT(hwnd:%p, i:%d, prc:%p)\n"),
2903                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)prc);
2904     return FALSE;
2905 }
2906 
2907 static __inline BOOL MSGDUMP_API
2908 MD_ListView_OnSetItemPosition(HWND hwnd, INT i, INT x, INT y)
2909 {
2910     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMPOSITION(hwnd:%p, i:%d, x:%d, y:%d)\n"),
2911                     MSGDUMP_PREFIX, (void *)hwnd, i, x, y);
2912     return FALSE;
2913 }
2914 
2915 static __inline BOOL MSGDUMP_API
2916 MD_ListView_OnGetItemPosition(HWND hwnd, INT i, POINT *ppt)
2917 {
2918     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMPOSITION(hwnd:%p, i:%d, ppt:%p)\n"),
2919                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)ppt);
2920     return FALSE;
2921 }
2922 
2923 static __inline INT MSGDUMP_API
2924 MD_ListView_OnGetStringWidthA(HWND hwnd, LPCSTR psz)
2925 {
2926     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSTRINGWIDTHA(hwnd:%p, psz:%p)\n"),
2927                     MSGDUMP_PREFIX, (void *)hwnd, (void *)psz);
2928     return 0;
2929 }
2930 
2931 static __inline INT MSGDUMP_API
2932 MD_ListView_OnHitTest(HWND hwnd, LV_HITTESTINFO *pinfo)
2933 {
2934     MSGDUMP_TPRINTF(TEXT("%sLVM_HITTEST(hwnd:%p, pinfo:%p)\n"),
2935                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pinfo);
2936     return 0;
2937 }
2938 
2939 static __inline BOOL MSGDUMP_API
2940 MD_ListView_OnEnsureVisible(HWND hwnd, INT i, BOOL fPartialOK)
2941 {
2942     MSGDUMP_TPRINTF(TEXT("%sLVM_ENSUREVISIBLE(hwnd:%p, i:%d, fPartialOK:%d)\n"),
2943                     MSGDUMP_PREFIX, (void *)hwnd, i, fPartialOK);
2944     return FALSE;
2945 }
2946 
2947 static __inline BOOL MSGDUMP_API
2948 MD_ListView_OnScroll(HWND hwnd, INT dx, INT dy)
2949 {
2950     MSGDUMP_TPRINTF(TEXT("%sLVM_SCROLL(hwnd:%p, dx:%d, dy:%d)\n"),
2951                     MSGDUMP_PREFIX, (void *)hwnd, dx, dy);
2952     return FALSE;
2953 }
2954 
2955 static __inline BOOL MSGDUMP_API
2956 MD_ListView_OnRedrawItems(HWND hwnd, INT iFirst, INT iLast)
2957 {
2958     MSGDUMP_TPRINTF(TEXT("%sLVM_REDRAWITEMS(hwnd:%p, iFirst:%d, iLast:%d)\n"),
2959                     MSGDUMP_PREFIX, (void *)hwnd, iFirst, iLast);
2960     return FALSE;
2961 }
2962 
2963 static __inline BOOL MSGDUMP_API
2964 MD_ListView_OnArrange(HWND hwnd, UINT code)
2965 {
2966     MSGDUMP_TPRINTF(TEXT("%sLVM_ARRANGE(hwnd:%p, code:%u)\n"),
2967                     MSGDUMP_PREFIX, (void *)hwnd, code);
2968     return FALSE;
2969 }
2970 
2971 static __inline HWND MSGDUMP_API
2972 MD_ListView_OnEditLabelA(HWND hwnd, INT i)
2973 {
2974     MSGDUMP_TPRINTF(TEXT("%sLVM_EDITLABELA(hwnd:%p, i:%d)\n"),
2975                     MSGDUMP_PREFIX, (void *)hwnd, i);
2976     return NULL;
2977 }
2978 
2979 static __inline HWND MSGDUMP_API
2980 MD_ListView_OnGetEditControl(HWND hwnd)
2981 {
2982     MSGDUMP_TPRINTF(TEXT("%sLVM_GETEDITCONTROL(hwnd:%p)\n"),
2983                     MSGDUMP_PREFIX, (void *)hwnd);
2984     return NULL;
2985 }
2986 
2987 static __inline BOOL MSGDUMP_API
2988 MD_ListView_OnGetColumnA(HWND hwnd, INT iCol, LV_COLUMNA *pcol)
2989 {
2990     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCOLUMNA(hwnd:%p, iCol:%d, pcol:%p)\n"),
2991                     MSGDUMP_PREFIX, (void *)hwnd, iCol, (void *)pcol);
2992     return FALSE;
2993 }
2994 
2995 static __inline BOOL MSGDUMP_API
2996 MD_ListView_OnSetColumnA(HWND hwnd, INT iCol, const LV_COLUMNA *pcol)
2997 {
2998     MSGDUMP_TPRINTF(TEXT("%sLVM_SETCOLUMNA(hwnd:%p, iCol:%d, pcol:%p)\n"),
2999                     MSGDUMP_PREFIX, (void *)hwnd, iCol, (const void *)pcol);
3000     return FALSE;
3001 }
3002 
3003 static __inline INT MSGDUMP_API
3004 MD_ListView_OnInsertColumnA(HWND hwnd, INT iCol, const LV_COLUMNA *pcol)
3005 {
3006     MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTCOLUMNA(hwnd:%p, iCol:%d, pcol:%p)\n"),
3007                     MSGDUMP_PREFIX, (void *)hwnd, iCol, (const void *)pcol);
3008     return 0;
3009 }
3010 
3011 static __inline BOOL MSGDUMP_API
3012 MD_ListView_OnDeleteColumn(HWND hwnd, INT iCol)
3013 {
3014     MSGDUMP_TPRINTF(TEXT("%sLVM_DELETECOLUMN(hwnd:%p, iCol:%d)\n"),
3015                     MSGDUMP_PREFIX, (void *)hwnd, iCol);
3016     return FALSE;
3017 }
3018 
3019 static __inline INT MSGDUMP_API
3020 MD_ListView_OnGetColumnWidth(HWND hwnd, INT iCol)
3021 {
3022     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCOLUMNWIDTH(hwnd:%p, iCol:%d)\n"),
3023                     MSGDUMP_PREFIX, (void *)hwnd, iCol);
3024     return 0;
3025 }
3026 
3027 static __inline BOOL MSGDUMP_API
3028 MD_ListView_OnSetColumnWidth(HWND hwnd, INT iCol, INT cx)
3029 {
3030     MSGDUMP_TPRINTF(TEXT("%sLVM_SETCOLUMNWIDTH(hwnd:%p, iCol:%d, cx:%d)\n"),
3031                     MSGDUMP_PREFIX, (void *)hwnd, iCol, cx);
3032     return FALSE;
3033 }
3034 
3035 static __inline HWND MSGDUMP_API
3036 MD_ListView_OnGetHeader(HWND hwnd)
3037 {
3038     MSGDUMP_TPRINTF(TEXT("%sLVM_GETHEADER(hwnd:%p)\n"),
3039                     MSGDUMP_PREFIX, (void *)hwnd);
3040     return NULL;
3041 }
3042 
3043 static __inline HIMAGELIST MSGDUMP_API
3044 MD_ListView_OnCreateDragImage(HWND hwnd, INT i, LPPOINT lpptUpLeft)
3045 {
3046     MSGDUMP_TPRINTF(TEXT("%sLVM_CREATEDRAGIMAGE(hwnd:%p, i:%d, lpptUpLeft:%p)\n"),
3047                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)lpptUpLeft);
3048     return NULL;
3049 }
3050 
3051 static __inline BOOL MSGDUMP_API
3052 MD_ListView_OnGetViewRect(HWND hwnd, RECT *prc)
3053 {
3054     MSGDUMP_TPRINTF(TEXT("%sLVM_GETVIEWRECT(hwnd:%p, prc:%p)\n"),
3055                     MSGDUMP_PREFIX, (void *)hwnd, (void *)prc);
3056     return FALSE;
3057 }
3058 
3059 static __inline COLORREF MSGDUMP_API
3060 MD_ListView_OnGetTextColor(HWND hwnd)
3061 {
3062     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTEXTCOLOR(hwnd:%p)\n"),
3063                     MSGDUMP_PREFIX, (void *)hwnd);
3064     return 0;
3065 }
3066 
3067 static __inline BOOL MSGDUMP_API
3068 MD_ListView_OnSetTextColor(HWND hwnd, COLORREF clrText)
3069 {
3070     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTEXTCOLOR(hwnd:%p, clrText:0x%08lX)\n"),
3071                     MSGDUMP_PREFIX, (void *)hwnd, clrText);
3072     return FALSE;
3073 }
3074 
3075 static __inline COLORREF MSGDUMP_API
3076 MD_ListView_OnGetTextBkColor(HWND hwnd)
3077 {
3078     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTEXTBKCOLOR(hwnd:%p)\n"),
3079                     MSGDUMP_PREFIX, (void *)hwnd);
3080     return 0;
3081 }
3082 
3083 static __inline BOOL MSGDUMP_API
3084 MD_ListView_OnSetTextBkColor(HWND hwnd, COLORREF clrTextBk)
3085 {
3086     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTEXTBKCOLOR(hwnd:%p, clrTextBk:0x%08lX)\n"),
3087                     MSGDUMP_PREFIX, (void *)hwnd, clrTextBk);
3088     return FALSE;
3089 }
3090 
3091 static __inline INT MSGDUMP_API
3092 MD_ListView_OnGetTopIndex(HWND hwnd)
3093 {
3094     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTOPINDEX(hwnd:%p)\n"),
3095                     MSGDUMP_PREFIX, (void *)hwnd);
3096     return 0;
3097 }
3098 
3099 static __inline INT MSGDUMP_API
3100 MD_ListView_OnGetCountPerPage(HWND hwnd)
3101 {
3102     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCOUNTPERPAGE(hwnd:%p)\n"),
3103                     MSGDUMP_PREFIX, (void *)hwnd);
3104     return 0;
3105 }
3106 
3107 static __inline BOOL MSGDUMP_API
3108 MD_ListView_OnGetOrigin(HWND hwnd, POINT *ppt)
3109 {
3110     MSGDUMP_TPRINTF(TEXT("%sLVM_GETORIGIN(hwnd:%p, ppt:%p)\n"),
3111                     MSGDUMP_PREFIX, (void *)hwnd, (void *)ppt);
3112     return FALSE;
3113 }
3114 
3115 static __inline BOOL MSGDUMP_API
3116 MD_ListView_OnUpdate(HWND hwnd, INT i)
3117 {
3118     MSGDUMP_TPRINTF(TEXT("%sLVM_UPDATE(hwnd:%p, i:%d)\n"),
3119                     MSGDUMP_PREFIX, (void *)hwnd, i);
3120     return FALSE;
3121 }
3122 
3123 static __inline BOOL MSGDUMP_API
3124 MD_ListView_OnSetItemState(HWND hwnd, INT i, LV_ITEM *lvi)
3125 {
3126     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMSTATE(hwnd:%p, i:%d, lvi:%p)\n"),
3127                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)lvi);
3128     return FALSE;
3129 }
3130 
3131 static __inline UINT MSGDUMP_API
3132 MD_ListView_OnGetItemState(HWND hwnd, INT i, UINT mask)
3133 {
3134     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMSTATE(hwnd:%p, i:%d, mask:%u)\n"),
3135                     MSGDUMP_PREFIX, (void *)hwnd, i, mask);
3136     return 0;
3137 }
3138 
3139 static __inline INT MSGDUMP_API
3140 MD_ListView_OnGetItemTextA(HWND hwnd, INT i, LV_ITEMA *lvi)
3141 {
3142     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMTEXTA(hwnd:%p, i:%d, lvi:%p)\n"),
3143                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)lvi);
3144     return 0;
3145 }
3146 
3147 static __inline BOOL MSGDUMP_API
3148 MD_ListView_OnSetItemTextA(HWND hwnd, INT i, const LV_ITEMA *lvi)
3149 {
3150     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMTEXTA(hwnd:%p, i:%d, lvi:%p)\n"),
3151                     MSGDUMP_PREFIX, (void *)hwnd, i, (const void *)lvi);
3152     return FALSE;
3153 }
3154 
3155 static __inline void MSGDUMP_API
3156 MD_ListView_OnSetItemCount(HWND hwnd, INT cItems)
3157 {
3158     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMCOUNT(hwnd:%p, cItems:%d)\n"),
3159                     MSGDUMP_PREFIX, (void *)hwnd, cItems);
3160 }
3161 
3162 static __inline BOOL MSGDUMP_API
3163 MD_ListView_OnSortItems(HWND hwnd, LPARAM lPrm, PFNLVCOMPARE pfnCompare)
3164 {
3165     MSGDUMP_TPRINTF(TEXT("%sLVM_SORTITEMS(hwnd:%p, lPrm:%p, pfnCompare:%p)\n"),
3166                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lPrm, *(void **)&pfnCompare);
3167     return FALSE;
3168 }
3169 
3170 static __inline void MSGDUMP_API
3171 MD_ListView_OnSetItemPosition32(HWND hwnd, INT i, const POINT *ppt)
3172 {
3173     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMPOSITION32(hwnd:%p, i:%d, ppt:%p)\n"),
3174                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)ppt);
3175 }
3176 
3177 static __inline UINT MSGDUMP_API
3178 MD_ListView_OnGetSelectedCount(HWND hwnd)
3179 {
3180     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSELECTEDCOUNT(hwnd:%p)\n"),
3181                     MSGDUMP_PREFIX, (void *)hwnd);
3182     return 0;
3183 }
3184 
3185 static __inline DWORD MSGDUMP_API
3186 MD_ListView_OnGetItemSpacing(HWND hwnd, BOOL fSmall)
3187 {
3188     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMSPACING(hwnd:%p, fSmall:%d)\n"),
3189                     MSGDUMP_PREFIX, (void *)hwnd, fSmall);
3190     return 0;
3191 }
3192 
3193 static __inline BOOL MSGDUMP_API
3194 MD_ListView_OnGetISearchStringA(HWND hwnd, LPSTR lpsz)
3195 {
3196     MSGDUMP_TPRINTF(TEXT("%sLVM_GETISEARCHSTRINGA(hwnd:%p, lpsz:%p)\n"),
3197                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsz);
3198     return FALSE;
3199 }
3200 
3201 static __inline DWORD MSGDUMP_API
3202 MD_ListView_OnSetIconSpacing(HWND hwnd, INT cx, INT cy)
3203 {
3204     MSGDUMP_TPRINTF(TEXT("%sLVM_SETICONSPACING(hwnd:%p, cx:%d, cy:%d)\n"),
3205                     MSGDUMP_PREFIX, (void *)hwnd, cx, cy);
3206     return 0;
3207 }
3208 
3209 static __inline DWORD MSGDUMP_API
3210 MD_ListView_OnSetExtendedListViewStyle(HWND hwnd, DWORD dwMask, DWORD dw)
3211 {
3212     MSGDUMP_TPRINTF(TEXT("%sLVM_SETEXTENDEDLISTVIEWSTYLE(hwnd:%p, dwMask:0x%08lX, dw:0x%08lX)\n"),
3213                     MSGDUMP_PREFIX, (void *)hwnd, dwMask, dw);
3214     return 0;
3215 }
3216 
3217 static __inline DWORD MSGDUMP_API
3218 MD_ListView_OnGetExtendedListViewStyle(HWND hwnd)
3219 {
3220     MSGDUMP_TPRINTF(TEXT("%sLVM_GETEXTENDEDLISTVIEWSTYLE(hwnd:%p)\n"),
3221                     MSGDUMP_PREFIX, (void *)hwnd);
3222     return 0;
3223 }
3224 
3225 static __inline BOOL MSGDUMP_API
3226 MD_ListView_OnGetSubItemRect(HWND hwnd, INT iItem, RECT *prc)
3227 {
3228     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSUBITEMRECT(hwnd:%p, iItem:%d, prc:%p)\n"),
3229                     MSGDUMP_PREFIX, (void *)hwnd, iItem, (void *)prc);
3230     return FALSE;
3231 }
3232 
3233 static __inline INT MSGDUMP_API
3234 MD_ListView_OnSubItemHitTest(HWND hwnd, WPARAM wParam, LPLVHITTESTINFO plvhti)
3235 {
3236     MSGDUMP_TPRINTF(TEXT("%sLVM_SUBITEMHITTEST(hwnd:%p, wParam:%p, plvhti:%p)\n"),
3237                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)plvhti);
3238     return 0;
3239 }
3240 
3241 static __inline BOOL MSGDUMP_API
3242 MD_ListView_OnSetColumnOrderArray(HWND hwnd, INT iCount, LPINT pi)
3243 {
3244     MSGDUMP_TPRINTF(TEXT("%sLVM_SETCOLUMNORDERARRAY(hwnd:%p, iCount:%d, pi:%p)\n"),
3245                     MSGDUMP_PREFIX, (void *)hwnd, iCount, (void *)pi);
3246     return FALSE;
3247 }
3248 
3249 static __inline BOOL MSGDUMP_API
3250 MD_ListView_OnGetColumnOrderArray(HWND hwnd, INT iCount, LPINT pi)
3251 {
3252     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCOLUMNORDERARRAY(hwnd:%p, iCount:%d, pi:%p)\n"),
3253                     MSGDUMP_PREFIX, (void *)hwnd, iCount, (void *)pi);
3254     return FALSE;
3255 }
3256 
3257 static __inline INT MSGDUMP_API
3258 MD_ListView_OnSetHotItem(HWND hwnd, INT i)
3259 {
3260     MSGDUMP_TPRINTF(TEXT("%sLVM_SETHOTITEM(hwnd:%p, i:%d)\n"),
3261                     MSGDUMP_PREFIX, (void *)hwnd, i);
3262     return 0;
3263 }
3264 
3265 static __inline INT MSGDUMP_API
3266 MD_ListView_OnGetHotItem(HWND hwnd)
3267 {
3268     MSGDUMP_TPRINTF(TEXT("%sLVM_GETHOTITEM(hwnd:%p)\n"),
3269                     MSGDUMP_PREFIX, (void *)hwnd);
3270     return 0;
3271 }
3272 
3273 static __inline HCURSOR MSGDUMP_API
3274 MD_ListView_OnSetHotCursor(HWND hwnd, HCURSOR hcur)
3275 {
3276     MSGDUMP_TPRINTF(TEXT("%sLVM_SETHOTCURSOR(hwnd:%p, hcur:%p)\n"),
3277                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hcur);
3278     return NULL;
3279 }
3280 
3281 static __inline HCURSOR MSGDUMP_API
3282 MD_ListView_OnGetHotCursor(HWND hwnd)
3283 {
3284     MSGDUMP_TPRINTF(TEXT("%sLVM_GETHOTCURSOR(hwnd:%p)\n"),
3285                     MSGDUMP_PREFIX, (void *)hwnd);
3286     return NULL;
3287 }
3288 
3289 static __inline DWORD MSGDUMP_API
3290 MD_ListView_OnApproximateViewRect(HWND hwnd, INT iWidth, INT iHeight, INT iCount)
3291 {
3292     MSGDUMP_TPRINTF(TEXT("%sLVM_APPROXIMATEVIEWRECT(hwnd:%p, iWidth:%d, iHeight:%d, iCount:%d)\n"),
3293                     MSGDUMP_PREFIX, (void *)hwnd, iWidth, iHeight, iCount);
3294     return 0;
3295 }
3296 
3297 static __inline BOOL MSGDUMP_API
3298 MD_ListView_OnSetWorkAreas(HWND hwnd, INT nWorkAreas, const RECT *prc)
3299 {
3300     MSGDUMP_TPRINTF(TEXT("%sLVM_SETWORKAREAS(hwnd:%p, nWorkAreas:%d, prc:%p)\n"),
3301                     MSGDUMP_PREFIX, (void *)hwnd, nWorkAreas, (void *)prc);
3302     return FALSE;
3303 }
3304 
3305 static __inline INT MSGDUMP_API
3306 MD_ListView_OnGetSelectionMark(HWND hwnd)
3307 {
3308     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSELECTIONMARK(hwnd:%p)\n"),
3309                     MSGDUMP_PREFIX, (void *)hwnd);
3310     return 0;
3311 }
3312 
3313 static __inline INT MSGDUMP_API
3314 MD_ListView_OnSetSelectionMark(HWND hwnd, INT i)
3315 {
3316     MSGDUMP_TPRINTF(TEXT("%sLVM_SETSELECTIONMARK(hwnd:%p, i:%d)\n"),
3317                     MSGDUMP_PREFIX, (void *)hwnd, i);
3318     return 0;
3319 }
3320 
3321 static __inline BOOL MSGDUMP_API
3322 MD_ListView_OnSetBkImageA(HWND hwnd, const LVBKIMAGEA *plvbki)
3323 {
3324     MSGDUMP_TPRINTF(TEXT("%sLVM_SETBKIMAGEA(hwnd:%p, plvbki:%p)\n"),
3325                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)plvbki);
3326     return FALSE;
3327 }
3328 
3329 static __inline BOOL MSGDUMP_API
3330 MD_ListView_OnGetBkImageA(HWND hwnd, LVBKIMAGEA *plvbki)
3331 {
3332     MSGDUMP_TPRINTF(TEXT("%sLVM_GETBKIMAGEA(hwnd:%p, plvbki:%p)\n"),
3333                     MSGDUMP_PREFIX, (void *)hwnd, (void *)plvbki);
3334     return FALSE;
3335 }
3336 
3337 static __inline BOOL MSGDUMP_API
3338 MD_ListView_OnGetWorkAreas(HWND hwnd, INT nWorkAreas, RECT *prc)
3339 {
3340     MSGDUMP_TPRINTF(TEXT("%sLVM_GETWORKAREAS(hwnd:%p, nWorkAreas:%d, prc:%p)\n"),
3341                     MSGDUMP_PREFIX, (void *)hwnd, nWorkAreas, (void *)prc);
3342     return FALSE;
3343 }
3344 
3345 static __inline DWORD MSGDUMP_API
3346 MD_ListView_OnSetHoverTime(HWND hwnd, DWORD dwHoverTimeMs)
3347 {
3348     MSGDUMP_TPRINTF(TEXT("%sLVM_SETHOVERTIME(hwnd:%p, dwHoverTimeMs:0x%08lX)\n"),
3349                     MSGDUMP_PREFIX, (void *)hwnd, dwHoverTimeMs);
3350     return 0;
3351 }
3352 
3353 static __inline DWORD MSGDUMP_API
3354 MD_ListView_OnGetHoverTime(HWND hwnd)
3355 {
3356     MSGDUMP_TPRINTF(TEXT("%sLVM_GETHOVERTIME(hwnd:%p)\n"),
3357                     MSGDUMP_PREFIX, (void *)hwnd);
3358     return 0;
3359 }
3360 
3361 static __inline BOOL MSGDUMP_API
3362 MD_ListView_OnGetNumberOfWorkAreas(HWND hwnd, UINT *pnWorkAreas)
3363 {
3364     MSGDUMP_TPRINTF(TEXT("%sLVM_GETNUMBEROFWORKAREAS(hwnd:%p, pnWorkAreas:%p)\n"),
3365                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pnWorkAreas);
3366     return FALSE;
3367 }
3368 
3369 static __inline HWND MSGDUMP_API
3370 MD_ListView_OnSetToolTips(HWND hwnd, HWND hwndNewHwnd)
3371 {
3372     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTOOLTIPS(hwnd:%p, hwndNewHwnd:%p)\n"),
3373                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndNewHwnd);
3374     return NULL;
3375 }
3376 
3377 static __inline BOOL MSGDUMP_API
3378 MD_ListView_OnGetItemW(HWND hwnd, LV_ITEMW *pitem)
3379 {
3380     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMW(hwnd:%p, pitem:%p)\n"),
3381                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
3382     return FALSE;
3383 }
3384 
3385 static __inline BOOL MSGDUMP_API
3386 MD_ListView_OnSetItemW(HWND hwnd, const LV_ITEMW *pitem)
3387 {
3388     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMW(hwnd:%p, pitem:%p)\n"),
3389                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)pitem);
3390     return FALSE;
3391 }
3392 
3393 static __inline INT MSGDUMP_API
3394 MD_ListView_OnInsertItemW(HWND hwnd, const LV_ITEMW *pitem)
3395 {
3396     MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTITEMW(hwnd:%p, pitem:%p)\n"),
3397                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)pitem);
3398     return 0;
3399 }
3400 
3401 static __inline HWND MSGDUMP_API
3402 MD_ListView_OnGetToolTips(HWND hwnd)
3403 {
3404     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTOOLTIPS(hwnd:%p)\n"),
3405                     MSGDUMP_PREFIX, (void *)hwnd);
3406     return NULL;
3407 }
3408 
3409 static __inline BOOL MSGDUMP_API
3410 MD_ListView_OnSortItemsEx(HWND hwnd, PFNLVCOMPARE pfnCompare, LPARAM lPrm)
3411 {
3412     MSGDUMP_TPRINTF(TEXT("%sLVM_SORTITEMSEX(hwnd:%p, pfnCompare:%p, lPrm:%p)\n"),
3413                     MSGDUMP_PREFIX, (void *)hwnd, *(void **)&pfnCompare, (void *)lPrm);
3414     return FALSE;
3415 }
3416 
3417 static __inline INT MSGDUMP_API
3418 MD_ListView_OnFindItemW(HWND hwnd, INT iStart, const LV_FINDINFOW *plvfi)
3419 {
3420     MSGDUMP_TPRINTF(TEXT("%sLVM_FINDITEMW(hwnd:%p, iStart:%d, plvfi:%p)\n"),
3421                     MSGDUMP_PREFIX, (void *)hwnd, iStart, (void *)plvfi);
3422     return 0;
3423 }
3424 
3425 static __inline INT MSGDUMP_API
3426 MD_ListView_OnGetStringWidthW(HWND hwnd, LPCWSTR psz)
3427 {
3428     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSTRINGWIDTHW(hwnd:%p, psz:%ls)\n"),
3429                     MSGDUMP_PREFIX, (void *)hwnd, psz);
3430     return 0;
3431 }
3432 
3433 #if NTDDI_VERSION >= 0x06000000
3434     static __inline UINT MSGDUMP_API
3435     MD_ListView_OnGetGroupState(HWND hwnd, DWORD dwGroupId, DWORD dwMask)
3436     {
3437         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPSTATE(hwnd:%p, dwGroupId:0x%08lX, dwMask:0x%08lX)\n"),
3438                         MSGDUMP_PREFIX, (void *)hwnd, dwGroupId, dwMask);
3439         return 0;
3440     }
3441 
3442     static __inline INT MSGDUMP_API
3443     MD_ListView_OnGetFocusedGroup(HWND hwnd)
3444     {
3445         MSGDUMP_TPRINTF(TEXT("%sLVM_GETFOCUSEDGROUP(hwnd:%p)\n"),
3446                         MSGDUMP_PREFIX, (void *)hwnd);
3447         return 0;
3448     }
3449 #endif
3450 
3451 static __inline INT MSGDUMP_API
3452 MD_ListView_OnGetColumnW(HWND hwnd, INT iCol)
3453 {
3454     MSGDUMP_TPRINTF(TEXT("%sLVM_GETCOLUMNW(hwnd:%p, iCol:%d)\n"),
3455                     MSGDUMP_PREFIX, (void *)hwnd, iCol);
3456     return 0;
3457 }
3458 
3459 static __inline BOOL MSGDUMP_API
3460 MD_ListView_OnSetColumnW(HWND hwnd, INT iCol, INT cx)
3461 {
3462     MSGDUMP_TPRINTF(TEXT("%sLVM_SETCOLUMNW(hwnd:%p, iCol:%d, cx:%d)\n"),
3463                     MSGDUMP_PREFIX, (void *)hwnd, iCol, cx);
3464     return 0;
3465 }
3466 
3467 static __inline INT MSGDUMP_API
3468 MD_ListView_OnInsertColumnW(HWND hwnd, INT iCol, const LV_COLUMNW *pcol)
3469 {
3470     MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTCOLUMNW(hwnd:%p, iCol:%d, pcol:%p)\n"),
3471                     MSGDUMP_PREFIX, (void *)hwnd, iCol, (const void *)pcol);
3472     return 0;
3473 }
3474 
3475 #if NTDDI_VERSION >= 0x06000000
3476     static __inline BOOL MSGDUMP_API
3477     MD_ListView_OnGetGroupRect(HWND hwnd, INT iGroupId, RECT *prc)
3478     {
3479         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPRECT(hwnd:%p, iGroupId:%d, prc:%p)\n"),
3480                         MSGDUMP_PREFIX, (void *)hwnd, iGroupId, (void *)prc);
3481         return FALSE;
3482     }
3483 #endif
3484 
3485 static __inline INT MSGDUMP_API
3486 MD_ListView_OnGetItemTextW(HWND hwnd, INT i, LV_ITEMW *pitem)
3487 {
3488     MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMTEXTW(hwnd:%p, i:%d, pitem:%p)\n"),
3489                     MSGDUMP_PREFIX, (void *)hwnd, i, (void *)pitem);
3490     return 0;
3491 }
3492 
3493 static __inline INT MSGDUMP_API
3494 MD_ListView_OnSetItemTextW(HWND hwnd, INT i, const LV_ITEMW *pitem)
3495 {
3496     MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMTEXTW(hwnd:%p, i:%d, pitem:%p)\n"),
3497                     MSGDUMP_PREFIX, (void *)hwnd, i, (const void *)pitem);
3498     return 0;
3499 }
3500 
3501 static __inline BOOL MSGDUMP_API
3502 MD_ListView_OnGetISearchStringW(HWND hwnd, LPWSTR lpsz)
3503 {
3504     MSGDUMP_TPRINTF(TEXT("%sLVM_GETISEARCHSTRINGW(hwnd:%p, lpsz:%p)\n"),
3505                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsz);
3506     return FALSE;
3507 }
3508 
3509 static __inline HWND MSGDUMP_API
3510 MD_ListView_OnEditLabelW(HWND hwnd, INT i)
3511 {
3512     MSGDUMP_TPRINTF(TEXT("%sLVM_EDITLABELW(hwnd:%p, i:%d)\n"),
3513                     MSGDUMP_PREFIX, (void *)hwnd, i);
3514     return NULL;
3515 }
3516 
3517 static __inline BOOL MSGDUMP_API
3518 MD_ListView_OnSetBkImageW(HWND hwnd, const LVBKIMAGEW *plvbki)
3519 {
3520     MSGDUMP_TPRINTF(TEXT("%sLVM_SETBKIMAGEW(hwnd:%p, plvbki:%p)\n"),
3521                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)plvbki);
3522     return FALSE;
3523 }
3524 
3525 static __inline BOOL MSGDUMP_API
3526 MD_ListView_OnGetBkImageW(HWND hwnd, LVBKIMAGEW *plvbki)
3527 {
3528     MSGDUMP_TPRINTF(TEXT("%sLVM_GETBKIMAGEW(hwnd:%p, plvbki:%p)\n"),
3529                     MSGDUMP_PREFIX, (void *)hwnd, (void *)plvbki);
3530     return FALSE;
3531 }
3532 
3533 static __inline void MSGDUMP_API
3534 MD_ListView_OnSetSelectedColumn(HWND hwnd, INT iCol)
3535 {
3536     MSGDUMP_TPRINTF(TEXT("%sLVM_SETSELECTEDCOLUMN(hwnd:%p, iCol:%d)\n"),
3537                     MSGDUMP_PREFIX, (void *)hwnd, iCol);
3538 }
3539 
3540 #ifndef LVM_SETTILEWIDTH
3541     #define LVM_SETTILEWIDTH (LVM_FIRST+141)
3542 #endif
3543 
3544 static __inline LRESULT MSGDUMP_API
3545 MD_ListView_OnSetTileWidth(HWND hwnd, WPARAM wParam, LPARAM lParam)
3546 {
3547     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTILEWIDTH(hwnd:%p, wParam:%p, lParam:%p)\n"),
3548                     MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
3549     return 0;
3550 }
3551 
3552 static __inline DWORD MSGDUMP_API
3553 MD_ListView_OnSetView(HWND hwnd, DWORD iView)
3554 {
3555     MSGDUMP_TPRINTF(TEXT("%sLVM_SETVIEW(hwnd:%p, iView:0x%08lX)\n"),
3556                     MSGDUMP_PREFIX, (void *)hwnd, iView);
3557     return 0;
3558 }
3559 
3560 static __inline DWORD MSGDUMP_API
3561 MD_ListView_OnGetView(HWND hwnd)
3562 {
3563     MSGDUMP_TPRINTF(TEXT("%sLVM_GETVIEW(hwnd:%p)\n"),
3564                     MSGDUMP_PREFIX, (void *)hwnd);
3565     return 0;
3566 }
3567 
3568 #if NTDDI_VERSION >= 0x06000000
3569     static __inline INT MSGDUMP_API
3570     MD_ListView_OnInsertGroup(HWND hwnd, INT iGroupId, const LVGROUP *pGroup)
3571     {
3572         MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTGROUP(hwnd:%p, iGroupId:%d, pGroup:%p)\n"),
3573                         MSGDUMP_PREFIX, (void *)hwnd, iGroupId, (const void *)pGroup);
3574         return 0;
3575     }
3576 
3577     static __inline INT MSGDUMP_API
3578     MD_ListView_OnSetGroupInfo(HWND hwnd, INT iGroupId, const LVGROUP *pGroup)
3579     {
3580         MSGDUMP_TPRINTF(TEXT("%sLVM_SETGROUPINFO(hwnd:%p, iGroupId:%d, pGroup:%p)\n"),
3581                         MSGDUMP_PREFIX, (void *)hwnd, iGroupId, (const void *)pGroup);
3582         return 0;
3583     }
3584 
3585     static __inline INT MSGDUMP_API
3586     MD_ListView_OnGetGroupInfo(HWND hwnd, INT iGroupId, LVGROUP *pGroup)
3587     {
3588         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPINFO(hwnd:%p, iGroupId:%d, pGroup:%p)\n"),
3589                         MSGDUMP_PREFIX, (void *)hwnd, iGroupId, (void *)pGroup);
3590         return 0;
3591     }
3592 
3593     static __inline INT MSGDUMP_API
3594     MD_ListView_OnRemoveGroup(HWND hwnd, INT iGroupId)
3595     {
3596         MSGDUMP_TPRINTF(TEXT("%sLVM_REMOVEGROUP(hwnd:%p, iGroupId:%d)\n"),
3597                         MSGDUMP_PREFIX, (void *)hwnd, iGroupId);
3598         return 0;
3599     }
3600 
3601     static __inline LRESULT MSGDUMP_API
3602     MD_ListView_OnMoveGroup(HWND hwnd, WPARAM wParam, LPARAM lParam)
3603     {
3604         MSGDUMP_TPRINTF(TEXT("%sLVM_MOVEGROUP(hwnd:%p, wParam:%p, lParam:%p)\n"),
3605                         MSGDUMP_PREFIX, (void *)hwnd, wParam, lParam);
3606         return 0;
3607     }
3608 
3609     static __inline INT MSGDUMP_API
3610     MD_ListView_OnGetGroupCount(HWND hwnd)
3611     {
3612         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPCOUNT(hwnd:%p)\n"),
3613                         MSGDUMP_PREFIX, (void *)hwnd);
3614         return 0;
3615     }
3616 
3617     static __inline BOOL MSGDUMP_API
3618     MD_ListView_OnGetGroupInfoByIndex(HWND hwnd, INT iIndex, LVGROUP *pgrp)
3619     {
3620         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPINFOBYINDEX(hwnd:%p, iIndex:%d, pgrp:%p)\n"),
3621                         MSGDUMP_PREFIX, (void *)hwnd, iIndex, (void *)pgrp);
3622         return FALSE;
3623     }
3624 
3625     static __inline LRESULT MSGDUMP_API
3626     MD_ListView_OnMoveItemToGroup(HWND hwnd, WPARAM wParam, LPARAM lParam)
3627     {
3628         MSGDUMP_TPRINTF(TEXT("%sLVM_MOVEITEMTOGROUP(hwnd:%p, wParam:%p, lParam:%p)\n"),
3629                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
3630         return 0;
3631     }
3632 
3633     static __inline void MSGDUMP_API
3634     MD_ListView_OnSetGroupMetrics(HWND hwnd, const LVGROUPMETRICS *pGroupMetrics)
3635     {
3636         MSGDUMP_TPRINTF(TEXT("%sLVM_SETGROUPMETRICS(hwnd:%p, pGroupMetrics:%p)\n"),
3637                         MSGDUMP_PREFIX, (void *)hwnd, (const void *)pGroupMetrics);
3638     }
3639 
3640     static __inline void MSGDUMP_API
3641     MD_ListView_OnGetGroupMetrics(HWND hwnd, LVGROUPMETRICS *pGroupMetrics)
3642     {
3643         MSGDUMP_TPRINTF(TEXT("%sLVM_GETGROUPMETRICS(hwnd:%p, pGroupMetrics:%p)\n"),
3644                         MSGDUMP_PREFIX, (void *)hwnd, (void *)pGroupMetrics);
3645     }
3646 
3647     static __inline INT MSGDUMP_API
3648     MD_ListView_OnEnableGroupView(HWND hwnd, BOOL fEnable)
3649     {
3650         MSGDUMP_TPRINTF(TEXT("%sLVM_ENABLEGROUPVIEW(hwnd:%p, fEnable:%d)\n"),
3651                         MSGDUMP_PREFIX, (void *)hwnd, fEnable);
3652         return 0;
3653     }
3654 
3655     static __inline BOOL MSGDUMP_API
3656     MD_ListView_OnSortGroups(HWND hwnd, PFNLVGROUPCOMPARE pfnGroupCompate, void *plv)
3657     {
3658         MSGDUMP_TPRINTF(TEXT("%sLVM_SORTGROUPS(hwnd:%p, pfnGroupCompate:%p, plv:%p)\n"),
3659                         MSGDUMP_PREFIX, (void *)hwnd, *(void **)&pfnGroupCompate, plv);
3660         return FALSE;
3661     }
3662 
3663     static __inline void MSGDUMP_API
3664     MD_ListView_OnInsertGroupSorted(HWND hwnd, const LVINSERTGROUPSORTED *structInsert)
3665     {
3666         MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTGROUPSORTED(hwnd:%p, structInsert:%p)\n"),
3667                         MSGDUMP_PREFIX, (void *)hwnd, (void *)structInsert);
3668     }
3669 
3670     static __inline void MSGDUMP_API
3671     MD_ListView_OnRemoveAllGroups(HWND hwnd)
3672     {
3673         MSGDUMP_TPRINTF(TEXT("%sLVM_REMOVEALLGROUPS(hwnd:%p)\n"),
3674                         MSGDUMP_PREFIX, (void *)hwnd);
3675     }
3676 
3677     static __inline BOOL MSGDUMP_API
3678     MD_ListView_OnHasGroup(HWND hwnd, DWORD dwGroupId)
3679     {
3680         MSGDUMP_TPRINTF(TEXT("%sLVM_HASGROUP(hwnd:%p, dwGroupId:0x%08lX)\n"),
3681                         MSGDUMP_PREFIX, (void *)hwnd, dwGroupId);
3682         return FALSE;
3683     }
3684 #endif
3685 
3686 static __inline BOOL MSGDUMP_API
3687 MD_ListView_OnSetTileViewInfo(HWND hwnd, const LVTILEVIEWINFO *ptvi)
3688 {
3689     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTILEVIEWINFO(hwnd:%p, ptvi:%p)\n"),
3690                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)ptvi);
3691     return FALSE;
3692 }
3693 
3694 static __inline void MSGDUMP_API
3695 MD_ListView_OnGetTileViewInfo(HWND hwnd, LVTILEVIEWINFO *ptvi)
3696 {
3697     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTILEVIEWINFO(hwnd:%p, ptvi:%p)\n"),
3698                     MSGDUMP_PREFIX, (void *)hwnd, (void *)ptvi);
3699 }
3700 
3701 static __inline BOOL MSGDUMP_API
3702 MD_ListView_OnSetTileInfo(HWND hwnd, const LVTILEINFO *pti)
3703 {
3704     MSGDUMP_TPRINTF(TEXT("%sLVM_SETTILEINFO(hwnd:%p, pti:%p)\n"),
3705                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)pti);
3706     return FALSE;
3707 }
3708 
3709 static __inline void MSGDUMP_API
3710 MD_ListView_OnGetTileInfo(HWND hwnd, LVTILEINFO *pti)
3711 {
3712     MSGDUMP_TPRINTF(TEXT("%sLVM_GETTILEINFO(hwnd:%p, pti:%p)\n"),
3713                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pti);
3714 }
3715 
3716 static __inline BOOL MSGDUMP_API
3717 MD_ListView_OnSetInsertMark(HWND hwnd, const LVINSERTMARK *lvim)
3718 {
3719     MSGDUMP_TPRINTF(TEXT("%sLVM_SETINSERTMARK(hwnd:%p, lvim:%p)\n"),
3720                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)lvim);
3721     return FALSE;
3722 }
3723 
3724 static __inline BOOL MSGDUMP_API
3725 MD_ListView_OnGetInsertMark(HWND hwnd, LVINSERTMARK *lvim)
3726 {
3727     MSGDUMP_TPRINTF(TEXT("%sLVM_GETINSERTMARK(hwnd:%p, lvim:%p)\n"),
3728                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lvim);
3729     return FALSE;
3730 }
3731 
3732 static __inline INT MSGDUMP_API
3733 MD_ListView_OnInsertMarkHitTest(HWND hwnd, LPPOINT point, LPLVINSERTMARK lvim)
3734 {
3735     MSGDUMP_TPRINTF(TEXT("%sLVM_INSERTMARKHITTEST(hwnd:%p, point:%p, lvim:%p)\n"),
3736                     MSGDUMP_PREFIX, (void *)hwnd, (void *)point, (void *)lvim);
3737     return 0;
3738 }
3739 
3740 static __inline INT MSGDUMP_API
3741 MD_ListView_OnGetInsertMarkRect(HWND hwnd, LPRECT rc)
3742 {
3743     MSGDUMP_TPRINTF(TEXT("%sLVM_GETINSERTMARKRECT(hwnd:%p, rc:%p)\n"),
3744                     MSGDUMP_PREFIX, (void *)hwnd, (void *)rc);
3745     return 0;
3746 }
3747 
3748 static __inline COLORREF MSGDUMP_API
3749 MD_ListView_OnSetInsertMarkColor(HWND hwnd, COLORREF color)
3750 {
3751     MSGDUMP_TPRINTF(TEXT("%sLVM_SETINSERTMARKCOLOR(hwnd:%p, color:0x%08lX)\n"),
3752                     MSGDUMP_PREFIX, (void *)hwnd, color);
3753     return 0;
3754 }
3755 
3756 static __inline COLORREF MSGDUMP_API
3757 MD_ListView_OnGetInsertMarkColor(HWND hwnd)
3758 {
3759     MSGDUMP_TPRINTF(TEXT("%sLVM_GETINSERTMARKCOLOR(hwnd:%p)\n"),
3760                     MSGDUMP_PREFIX, (void *)hwnd);
3761     return 0;
3762 }
3763 
3764 static __inline BOOL MSGDUMP_API
3765 MD_ListView_OnSetInfoTip(HWND hwnd, const LVSETINFOTIP *plvInfoTip)
3766 {
3767     MSGDUMP_TPRINTF(TEXT("%sLVM_SETINFOTIP(hwnd:%p, plvInfoTip:%p)\n"),
3768                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)plvInfoTip);
3769     return FALSE;
3770 }
3771 
3772 static __inline UINT MSGDUMP_API
3773 MD_ListView_OnGetSelectedColumn(HWND hwnd)
3774 {
3775     MSGDUMP_TPRINTF(TEXT("%sLVM_GETSELECTEDCOLUMN(hwnd:%p)\n"),
3776                     MSGDUMP_PREFIX, (void *)hwnd);
3777     return 0;
3778 }
3779 
3780 static __inline BOOL MSGDUMP_API
3781 MD_ListView_OnIsGroupViewEnabled(HWND hwnd)
3782 {
3783     MSGDUMP_TPRINTF(TEXT("%sLVM_ISGROUPVIEWENABLED(hwnd:%p)\n"),
3784                     MSGDUMP_PREFIX, (void *)hwnd);
3785     return FALSE;
3786 }
3787 
3788 static __inline COLORREF MSGDUMP_API
3789 MD_ListView_OnGetOutlineColor(HWND hwnd)
3790 {
3791     MSGDUMP_TPRINTF(TEXT("%sLVM_GETOUTLINECOLOR(hwnd:%p)\n"),
3792                     MSGDUMP_PREFIX, (void *)hwnd);
3793     return 0;
3794 }
3795 
3796 static __inline COLORREF MSGDUMP_API
3797 MD_ListView_OnSetOutlineColor(HWND hwnd, COLORREF color)
3798 {
3799     MSGDUMP_TPRINTF(TEXT("%sLVM_SETOUTLINECOLOR(hwnd:%p, color:0x%08lX)\n"),
3800                     MSGDUMP_PREFIX, (void *)hwnd, color);
3801     return 0;
3802 }
3803 
3804 static __inline void MSGDUMP_API
3805 MD_ListView_OnCancelEditLabel(HWND hwnd)
3806 {
3807     MSGDUMP_TPRINTF(TEXT("%sLVM_CANCELEDITLABEL(hwnd:%p)\n"),
3808                     MSGDUMP_PREFIX, (void *)hwnd);
3809 }
3810 
3811 static __inline UINT MSGDUMP_API
3812 MD_ListView_OnMapIndexToID(HWND hwnd, UINT index)
3813 {
3814     MSGDUMP_TPRINTF(TEXT("%sLVM_MAPINDEXTOID(hwnd:%p, index:%u)\n"),
3815                     MSGDUMP_PREFIX, (void *)hwnd, index);
3816     return 0;
3817 }
3818 
3819 static __inline UINT MSGDUMP_API
3820 MD_ListView_OnMapIDToIndex(HWND hwnd, UINT id)
3821 {
3822     MSGDUMP_TPRINTF(TEXT("%sLVM_MAPIDTOINDEX(hwnd:%p, id:%u)\n"),
3823                     MSGDUMP_PREFIX, (void *)hwnd, id);
3824     return 0;
3825 }
3826 
3827 static __inline BOOL MSGDUMP_API
3828 MD_ListView_OnIsItemVisible(HWND hwnd, UINT index)
3829 {
3830     MSGDUMP_TPRINTF(TEXT("%sLVM_ISITEMVISIBLE(hwnd:%p, index:%u)\n"),
3831                     MSGDUMP_PREFIX, (void *)hwnd, index);
3832     return FALSE;
3833 }
3834 
3835 #if NTDDI_VERSION >= 0x06000000
3836     static __inline void MSGDUMP_API
3837     MD_ListView_OnGetEmptyText(HWND hwnd, PWSTR pszText, UINT cchText)
3838     {
3839         MSGDUMP_TPRINTF(TEXT("%sLVM_GETEMPTYTEXT(hwnd:%p, pszText:%p, cchText:%u)\n"),
3840                         MSGDUMP_PREFIX, (void *)hwnd, (void *)pszText, cchText);
3841     }
3842 
3843     static __inline BOOL MSGDUMP_API
3844     MD_ListView_OnGetFooterRect(HWND hwnd, RECT *prc)
3845     {
3846         MSGDUMP_TPRINTF(TEXT("%sLVM_GETFOOTERRECT(hwnd:%p, prc:%p)\n"),
3847                         MSGDUMP_PREFIX, (void *)hwnd, (void *)prc);
3848         return FALSE;
3849     }
3850 
3851     static __inline BOOL MSGDUMP_API
3852     MD_ListView_OnGetFooterInfo(HWND hwnd, LVFOOTERINFO *plvfi)
3853     {
3854         MSGDUMP_TPRINTF(TEXT("%sLVM_GETFOOTERINFO(hwnd:%p, plvfi:%p)\n"),
3855                         MSGDUMP_PREFIX, (void *)hwnd, (void *)plvfi);
3856         return FALSE;
3857     }
3858 
3859     static __inline BOOL MSGDUMP_API
3860     MD_ListView_OnGetFooterItemRect(HWND hwnd, INT iItem, RECT *prc)
3861     {
3862         MSGDUMP_TPRINTF(TEXT("%sLVM_GETFOOTERITEMRECT(hwnd:%p, iItem:%d, prc:%p)\n"),
3863                         MSGDUMP_PREFIX, (void *)hwnd, iItem, (void *)prc);
3864         return FALSE;
3865     }
3866 
3867     static __inline BOOL MSGDUMP_API
3868     MD_ListView_OnGetFooterItem(HWND hwnd, INT iItem, LVFOOTERITEM *pfi)
3869     {
3870         MSGDUMP_TPRINTF(TEXT("%sLVM_GETFOOTERITEM(hwnd:%p, iItem:%d, pfi:%p)\n"),
3871                         MSGDUMP_PREFIX, (void *)hwnd, iItem, (void *)pfi);
3872         return FALSE;
3873     }
3874 
3875     static __inline BOOL MSGDUMP_API
3876     MD_ListView_OnGetItemIndexRect(HWND hwnd, const LVITEMINDEX *plvii, RECT *prc)
3877     {
3878         MSGDUMP_TPRINTF(TEXT("%sLVM_GETITEMINDEXRECT(hwnd:%p, plvii:%p, prc:%p)\n"),
3879                         MSGDUMP_PREFIX, (void *)hwnd, (void *)plvii, (void *)prc);
3880         return FALSE;
3881     }
3882 
3883     static __inline HRESULT MSGDUMP_API
3884     MD_ListView_OnSetItemIndexState(HWND hwnd, const LVITEMINDEX *plvii, const LV_ITEM *lvi)
3885     {
3886         MSGDUMP_TPRINTF(TEXT("%sLVM_SETITEMINDEXSTATE(hwnd:%p, plvii:%p, lvi:%p)\n"),
3887                         MSGDUMP_PREFIX, (void *)hwnd, (const void *)plvii, (const void *)lvi);
3888         return 0;
3889     }
3890 
3891     static __inline BOOL MSGDUMP_API
3892     MD_ListView_OnGetNextItemIndex(HWND hwnd, LVITEMINDEX *plvii, UINT flags)
3893     {
3894         MSGDUMP_TPRINTF(TEXT("%sLVM_GETNEXTITEMINDEX(hwnd:%p, plvii:%p, flags:%u)\n"),
3895                         MSGDUMP_PREFIX, (void *)hwnd, (const void *)plvii, flags);
3896         return 0;
3897     }
3898 #endif
3899 
3900 static __inline HTREEITEM MSGDUMP_API
3901 MD_TreeView_OnInsertItemA(HWND hwnd, LPTV_INSERTSTRUCTA lpis)
3902 {
3903     MSGDUMP_TPRINTF(TEXT("%sTVM_INSERTITEMA(hwnd:%p, lpis:%p)\n"),
3904                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpis);
3905     return NULL;
3906 }
3907 
3908 static __inline BOOL MSGDUMP_API
3909 MD_TreeView_OnDeleteItem(HWND hwnd, HTREEITEM hitem)
3910 {
3911     MSGDUMP_TPRINTF(TEXT("%sTVM_DELETEITEM(hwnd:%p, hitem:%p)\n"),
3912                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
3913     return FALSE;
3914 }
3915 
3916 static __inline BOOL MSGDUMP_API
3917 MD_TreeView_OnExpand(HWND hwnd, HTREEITEM hitem, UINT code)
3918 {
3919     MSGDUMP_TPRINTF(TEXT("%sTVM_EXPAND(hwnd:%p, hitem:%p, code:%u)\n"),
3920                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem, code);
3921     return FALSE;
3922 }
3923 
3924 static __inline BOOL MSGDUMP_API
3925 MD_TreeView_OnGetItemRect(HWND hwnd, UINT code, RECT *prc)
3926 {
3927     MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMRECT(hwnd:%p, code:%u, prc:%p)\n"),
3928                     MSGDUMP_PREFIX, (void *)hwnd, code, (void *)prc);
3929     return FALSE;
3930 }
3931 
3932 static __inline UINT MSGDUMP_API
3933 MD_TreeView_OnGetCount(HWND hwnd)
3934 {
3935     MSGDUMP_TPRINTF(TEXT("%sTVM_GETCOUNT(hwnd:%p)\n"),
3936                     MSGDUMP_PREFIX, (void *)hwnd);
3937     return 0;
3938 }
3939 
3940 static __inline UINT MSGDUMP_API
3941 MD_TreeView_OnGetIndent(HWND hwnd)
3942 {
3943     MSGDUMP_TPRINTF(TEXT("%sTVM_GETINDENT(hwnd:%p)\n"),
3944                     MSGDUMP_PREFIX, (void *)hwnd);
3945     return 0;
3946 }
3947 
3948 static __inline BOOL MSGDUMP_API
3949 MD_TreeView_OnSetIndent(HWND hwnd, INT indent)
3950 {
3951     MSGDUMP_TPRINTF(TEXT("%sTVM_SETINDENT(hwnd:%p, indent:%d)\n"),
3952                     MSGDUMP_PREFIX, (void *)hwnd, indent);
3953     return FALSE;
3954 }
3955 
3956 static __inline HIMAGELIST MSGDUMP_API
3957 MD_TreeView_OnGetImageList(HWND hwnd, INT iImage)
3958 {
3959     MSGDUMP_TPRINTF(TEXT("%sTVM_GETIMAGELIST(hwnd:%p, iImage:%d)\n"),
3960                     MSGDUMP_PREFIX, (void *)hwnd, iImage);
3961     return NULL;
3962 }
3963 
3964 static __inline HIMAGELIST MSGDUMP_API
3965 MD_TreeView_OnSetImageList(HWND hwnd, INT iImage, HIMAGELIST himl)
3966 {
3967     MSGDUMP_TPRINTF(TEXT("%sTVM_GETIMAGELIST(hwnd:%p, iImage:%d, himl:%p)\n"),
3968                     MSGDUMP_PREFIX, (void *)hwnd, iImage, (void *)himl);
3969     return NULL;
3970 }
3971 
3972 static __inline HTREEITEM MSGDUMP_API
3973 MD_TreeView_OnGetNextItem(HWND hwnd, HTREEITEM hitem, UINT code)
3974 {
3975     MSGDUMP_TPRINTF(TEXT("%sTVM_GETNEXTITEM(hwnd:%p, hitem:%p, code:%u)\n"),
3976                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem, code);
3977     return NULL;
3978 }
3979 
3980 static __inline BOOL MSGDUMP_API
3981 MD_TreeView_OnSelectItem(HWND hwnd, UINT code, HTREEITEM hitem)
3982 {
3983     MSGDUMP_TPRINTF(TEXT("%sTVM_SELECTITEM(hwnd:%p, code:%u, hitem:%p)\n"),
3984                     MSGDUMP_PREFIX, (void *)hwnd, code, (void *)hitem);
3985     return FALSE;
3986 }
3987 
3988 static __inline BOOL MSGDUMP_API
3989 MD_TreeView_OnGetItemA(HWND hwnd, TV_ITEMA *pitem)
3990 {
3991     MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMA(hwnd:%p, pitem:%p)\n"),
3992                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
3993     return FALSE;
3994 }
3995 
3996 static __inline BOOL MSGDUMP_API
3997 MD_TreeView_OnSetItemA(HWND hwnd, const TV_ITEMA *pitem)
3998 {
3999     MSGDUMP_TPRINTF(TEXT("%sTVM_SETITEMA(hwnd:%p, pitem:%p)\n"),
4000                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)pitem);
4001     return FALSE;
4002 }
4003 
4004 static __inline HWND MSGDUMP_API
4005 MD_TreeView_OnEditLabelA(HWND hwnd, HTREEITEM hitem)
4006 {
4007     MSGDUMP_TPRINTF(TEXT("%sTVM_EDITLABELA(hwnd:%p, hitem:%p)\n"),
4008                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4009     return NULL;
4010 }
4011 
4012 static __inline HWND MSGDUMP_API
4013 MD_TreeView_OnGetEditControl(HWND hwnd)
4014 {
4015     MSGDUMP_TPRINTF(TEXT("%sTVM_GETEDITCONTROL(hwnd:%p)\n"),
4016                     MSGDUMP_PREFIX, (void *)hwnd);
4017     return NULL;
4018 }
4019 
4020 static __inline UINT MSGDUMP_API
4021 MD_TreeView_OnGetVisibleCount(HWND hwnd)
4022 {
4023     MSGDUMP_TPRINTF(TEXT("%sTVM_GETVISIBLECOUNT(hwnd:%p)\n"),
4024                     MSGDUMP_PREFIX, (void *)hwnd);
4025     return 0;
4026 }
4027 
4028 static __inline HTREEITEM MSGDUMP_API
4029 MD_TreeView_OnHitTest(HWND hwnd, LPTV_HITTESTINFO lpht)
4030 {
4031     MSGDUMP_TPRINTF(TEXT("%sTVM_HITTEST(hwnd:%p, lpht:%p)\n"),
4032                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpht);
4033     return NULL;
4034 }
4035 
4036 static __inline HIMAGELIST MSGDUMP_API
4037 MD_TreeView_OnCreateDragImage(HWND hwnd, HTREEITEM hitem)
4038 {
4039     MSGDUMP_TPRINTF(TEXT("%sTVM_CREATEDRAGIMAGE(hwnd:%p, hitem:%p)\n"),
4040                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4041     return NULL;
4042 }
4043 
4044 static __inline BOOL MSGDUMP_API
4045 MD_TreeView_OnSortChildren(HWND hwnd, HTREEITEM hitem, BOOL recurse)
4046 {
4047     MSGDUMP_TPRINTF(TEXT("%sTVM_SORTCHILDREN(hwnd:%p, hitem:%p, recurse:%d)\n"),
4048                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem, recurse);
4049     return FALSE;
4050 }
4051 
4052 static __inline BOOL MSGDUMP_API
4053 MD_TreeView_OnEnsureVisible(HWND hwnd, HTREEITEM hitem)
4054 {
4055     MSGDUMP_TPRINTF(TEXT("%sTVM_ENSUREVISIBLE(hwnd:%p, hitem:%p)\n"),
4056                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4057     return FALSE;
4058 }
4059 
4060 static __inline BOOL MSGDUMP_API
4061 MD_TreeView_OnSortChildrenCB(HWND hwnd, LPTV_SORTCB psort, BOOL recurse)
4062 {
4063     MSGDUMP_TPRINTF(TEXT("%sTVM_SORTCHILDRENCB(hwnd:%p, psort:%p, recurse:%d)\n"),
4064                     MSGDUMP_PREFIX, (void *)hwnd, (void *)psort, recurse);
4065     return FALSE;
4066 }
4067 
4068 static __inline BOOL MSGDUMP_API
4069 MD_TreeView_OnEndEditLabelNow(HWND hwnd, BOOL fCancel)
4070 {
4071     MSGDUMP_TPRINTF(TEXT("%sTVM_ENDEDITLABELNOW(hwnd:%p, fCancel:%d)\n"),
4072                     MSGDUMP_PREFIX, (void *)hwnd, fCancel);
4073     return FALSE;
4074 }
4075 
4076 static __inline BOOL MSGDUMP_API
4077 MD_TreeView_OnGetISearchStringA(HWND hwnd, LPSTR lpsz)
4078 {
4079     MSGDUMP_TPRINTF(TEXT("%sTVM_GETISEARCHSTRINGA(hwnd:%p, lpsz:%p)\n"),
4080                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsz);
4081     return FALSE;
4082 }
4083 
4084 static __inline HWND MSGDUMP_API
4085 MD_TreeView_OnSetToolTips(HWND hwnd, HWND hwndTT)
4086 {
4087     MSGDUMP_TPRINTF(TEXT("%sTVM_SETTOOLTIPS(hwnd:%p, hwndTT:%p)\n"),
4088                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hwndTT);
4089     return NULL;
4090 }
4091 
4092 static __inline HWND MSGDUMP_API
4093 MD_TreeView_OnGetToolTips(HWND hwnd)
4094 {
4095     MSGDUMP_TPRINTF(TEXT("%sTVM_GETTOOLTIPS(hwnd:%p)\n"),
4096                     MSGDUMP_PREFIX, (void *)hwnd);
4097     return NULL;
4098 }
4099 
4100 static __inline BOOL MSGDUMP_API
4101 MD_TreeView_OnSetInsertMark(HWND hwnd, HTREEITEM hItem, BOOL fAfter)
4102 {
4103     MSGDUMP_TPRINTF(TEXT("%sTVM_SETINSERTMARK(hwnd:%p, hItem:%p, fAfter:%d)\n"),
4104                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hItem, fAfter);
4105     return FALSE;
4106 }
4107 
4108 static __inline INT MSGDUMP_API
4109 MD_TreeView_OnSetItemHeight(HWND hwnd, INT iHeight)
4110 {
4111     MSGDUMP_TPRINTF(TEXT("%sTVM_SETITEMHEIGHT(hwnd:%p, iHeight:%d)\n"),
4112                     MSGDUMP_PREFIX, (void *)hwnd, iHeight);
4113     return 0;
4114 }
4115 
4116 static __inline INT MSGDUMP_API
4117 MD_TreeView_OnGetItemHeight(HWND hwnd)
4118 {
4119     MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMHEIGHT(hwnd:%p)\n"),
4120                     MSGDUMP_PREFIX, (void *)hwnd);
4121     return 0;
4122 }
4123 
4124 static __inline COLORREF MSGDUMP_API
4125 MD_TreeView_OnSetBkColor(HWND hwnd, COLORREF clr)
4126 {
4127     MSGDUMP_TPRINTF(TEXT("%sTVM_SETBKCOLOR(hwnd:%p, clr:0x%08lX)\n"),
4128                     MSGDUMP_PREFIX, (void *)hwnd, clr);
4129     return 0;
4130 }
4131 
4132 static __inline COLORREF MSGDUMP_API
4133 MD_TreeView_OnSetTextColor(HWND hwnd, COLORREF clr)
4134 {
4135     MSGDUMP_TPRINTF(TEXT("%sTVM_SETTEXTCOLOR(hwnd:%p, clr:0x%08lX)\n"),
4136                     MSGDUMP_PREFIX, (void *)hwnd, clr);
4137     return 0;
4138 }
4139 
4140 static __inline COLORREF MSGDUMP_API
4141 MD_TreeView_OnGetBkColor(HWND hwnd)
4142 {
4143     MSGDUMP_TPRINTF(TEXT("%sTVM_GETBKCOLOR(hwnd:%p)\n"),
4144                     MSGDUMP_PREFIX, (void *)hwnd);
4145     return 0;
4146 }
4147 
4148 static __inline COLORREF MSGDUMP_API
4149 MD_TreeView_OnGetTextColor(HWND hwnd)
4150 {
4151     MSGDUMP_TPRINTF(TEXT("%sTVM_GETTEXTCOLOR(hwnd:%p)\n"),
4152                     MSGDUMP_PREFIX, (void *)hwnd);
4153     return 0;
4154 }
4155 
4156 static __inline UINT MSGDUMP_API
4157 MD_TreeView_OnSetScrollTime(HWND hwnd, UINT uTime)
4158 {
4159     MSGDUMP_TPRINTF(TEXT("%sTVM_SETSCROLLTIME(hwnd:%p, uTime:%u)\n"),
4160                     MSGDUMP_PREFIX, (void *)hwnd, uTime);
4161     return 0;
4162 }
4163 
4164 static __inline UINT MSGDUMP_API
4165 MD_TreeView_OnGetScrollTime(HWND hwnd)
4166 {
4167     MSGDUMP_TPRINTF(TEXT("%sTVM_GETSCROLLTIME(hwnd:%p)\n"),
4168                     MSGDUMP_PREFIX, (void *)hwnd);
4169     return 0;
4170 }
4171 
4172 #if NTDDI_VERSION >= 0x06000000
4173     static __inline INT MSGDUMP_API
4174     MD_TreeView_OnSetBorder(HWND hwnd, DWORD dwFlags, INT xBorder, INT yBorder)
4175     {
4176         MSGDUMP_TPRINTF(TEXT("%sTVM_SETBORDER(hwnd:%p, dwFlags:0x%08lX, xBorder:%d, yBorder:%d)\n"),
4177                         MSGDUMP_PREFIX, (void *)hwnd, dwFlags, xBorder, yBorder);
4178         return 0;
4179     }
4180 #endif
4181 
4182 static __inline COLORREF MSGDUMP_API
4183 MD_TreeView_OnSetInsertMarkColor(HWND hwnd, COLORREF clr)
4184 {
4185     MSGDUMP_TPRINTF(TEXT("%sTVM_SETINSERTMARKCOLOR(hwnd:%p, clr:0x%08lX)\n"),
4186                     MSGDUMP_PREFIX, (void *)hwnd, clr);
4187     return 0;
4188 }
4189 
4190 static __inline COLORREF MSGDUMP_API
4191 MD_TreeView_OnGetInsertMarkColor(HWND hwnd)
4192 {
4193     MSGDUMP_TPRINTF(TEXT("%sTVM_GETINSERTMARKCOLOR(hwnd:%p)\n"),
4194                     MSGDUMP_PREFIX, (void *)hwnd);
4195     return 0;
4196 }
4197 
4198 static __inline UINT MSGDUMP_API
4199 MD_TreeView_OnGetItemState(HWND hwnd, HTREEITEM hti, UINT mask)
4200 {
4201     MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMSTATE(hwnd:%p, hti:%p, mask:%u)\n"),
4202                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hti, mask);
4203     return 0;
4204 }
4205 
4206 static __inline COLORREF MSGDUMP_API
4207 MD_TreeView_OnSetLineColor(HWND hwnd, COLORREF clr)
4208 {
4209     MSGDUMP_TPRINTF(TEXT("%sTVM_SETLINECOLOR(hwnd:%p, clr:0x%08lX)\n"),
4210                     MSGDUMP_PREFIX, (void *)hwnd, clr);
4211     return 0;
4212 }
4213 
4214 static __inline COLORREF MSGDUMP_API
4215 MD_TreeView_OnGetLineColor(HWND hwnd)
4216 {
4217     MSGDUMP_TPRINTF(TEXT("%sTVM_GETLINECOLOR(hwnd:%p)\n"),
4218                     MSGDUMP_PREFIX, (void *)hwnd);
4219     return 0;
4220 }
4221 
4222 static __inline HTREEITEM MSGDUMP_API
4223 MD_TreeView_OnMapAccIDToHTREEITEM(HWND hwnd, UINT id)
4224 {
4225     MSGDUMP_TPRINTF(TEXT("%sTVM_MAPACCIDTOHTREEITEM(hwnd:%p, id:%u)\n"),
4226                     MSGDUMP_PREFIX, (void *)hwnd, id);
4227     return NULL;
4228 }
4229 
4230 static __inline UINT MSGDUMP_API
4231 MD_TreeView_OnMapHTREEITEMToAccID(HWND hwnd, HTREEITEM htreeitem)
4232 {
4233     MSGDUMP_TPRINTF(TEXT("%sTVM_MAPHTREEITEMTOACCID(hwnd:%p, htreeitem:%p)\n"),
4234                     MSGDUMP_PREFIX, (void *)hwnd, (void *)htreeitem);
4235     return 0;
4236 }
4237 
4238 #if NTDDI_VERSION >= 0x06000000
4239     static __inline DWORD MSGDUMP_API
4240     MD_TreeView_OnSetExtendedStyle(HWND hwnd, DWORD dw, DWORD mask)
4241     {
4242         MSGDUMP_TPRINTF(TEXT("%sTVM_SETEXTENDEDSTYLE(hwnd:%p, dw:0x%08lX, mask:0x%08lX)\n"),
4243                         MSGDUMP_PREFIX, (void *)hwnd, dw, mask);
4244         return 0;
4245     }
4246 
4247     static __inline DWORD MSGDUMP_API
4248     MD_TreeView_OnGetExtendedStyle(HWND hwnd)
4249     {
4250         MSGDUMP_TPRINTF(TEXT("%sTVM_GETEXTENDEDSTYLE(hwnd:%p)\n"),
4251                         MSGDUMP_PREFIX, (void *)hwnd);
4252         return 0;
4253     }
4254 #endif
4255 
4256 static __inline HTREEITEM MSGDUMP_API
4257 MD_TreeView_OnInsertItemW(HWND hwnd, LPTV_INSERTSTRUCTW lpis)
4258 {
4259     MSGDUMP_TPRINTF(TEXT("%sTVM_INSERTITEMW(hwnd:%p, lpis:%p)\n"),
4260                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpis);
4261     return NULL;
4262 }
4263 
4264 #if NTDDI_VERSION >= 0x06000000
4265     static __inline BOOL MSGDUMP_API
4266     MD_TreeView_OnSetHot(HWND hwnd, HTREEITEM hitem)
4267     {
4268         MSGDUMP_TPRINTF(TEXT("%sTVM_SETHOT(hwnd:%p, hitem:%p)\n"),
4269                         MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4270         return FALSE;
4271     }
4272 
4273     static __inline BOOL MSGDUMP_API
4274     MD_TreeView_OnSetAutoScrollInfo(HWND hwnd, UINT uPixPerSec, UINT uUpdateTime)
4275     {
4276         MSGDUMP_TPRINTF(TEXT("%sTVM_SETAUTOSCROLLINFO(hwnd:%p, uPixPerSec:%u, uUpdateTime:%u)\n"),
4277                         MSGDUMP_PREFIX, (void *)hwnd, uPixPerSec, uUpdateTime);
4278         return FALSE;
4279     }
4280 #endif
4281 
4282 static __inline BOOL MSGDUMP_API
4283 MD_TreeView_OnGetItemW(HWND hwnd, TV_ITEMW *pitem)
4284 {
4285     MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMW(hwnd:%p, pitem:%p)\n"),
4286                     MSGDUMP_PREFIX, (void *)hwnd, (void *)pitem);
4287     return FALSE;
4288 }
4289 
4290 static __inline BOOL MSGDUMP_API
4291 MD_TreeView_OnSetItemW(HWND hwnd, const TV_ITEMW *pitem)
4292 {
4293     MSGDUMP_TPRINTF(TEXT("%sTVM_SETITEMW(hwnd:%p, pitem:%p)\n"),
4294                     MSGDUMP_PREFIX, (void *)hwnd, (const void *)pitem);
4295     return FALSE;
4296 }
4297 
4298 static __inline BOOL MSGDUMP_API
4299 MD_TreeView_OnGetISearchStringW(HWND hwnd, LPWSTR lpsz)
4300 {
4301     MSGDUMP_TPRINTF(TEXT("%sTVM_GETISEARCHSTRINGW(hwnd:%p, lpsz:%p)\n"),
4302                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpsz);
4303     return FALSE;
4304 }
4305 
4306 static __inline HWND MSGDUMP_API
4307 MD_TreeView_OnEditLabelW(HWND hwnd, HTREEITEM hitem)
4308 {
4309     MSGDUMP_TPRINTF(TEXT("%sTVM_EDITLABELW(hwnd:%p, hitem:%p)\n"),
4310                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4311     return NULL;
4312 }
4313 
4314 #if NTDDI_VERSION >= 0x06000000
4315     static __inline DWORD MSGDUMP_API
4316     MD_TreeView_OnGetSelectedCount(HWND hwnd)
4317     {
4318         MSGDUMP_TPRINTF(TEXT("%sTVM_GETSELECTEDCOUNT(hwnd:%p)\n"),
4319                         MSGDUMP_PREFIX, (void *)hwnd);
4320         return 0;
4321     }
4322 
4323     static __inline DWORD MSGDUMP_API
4324     MD_TreeView_OnShowInfoTip(HWND hwnd, HTREEITEM hitem)
4325     {
4326         MSGDUMP_TPRINTF(TEXT("%sTVM_SHOWINFOTIP(hwnd:%p, hitem:%p)\n"),
4327                         MSGDUMP_PREFIX, (void *)hwnd, (void *)hitem);
4328         return 0;
4329     }
4330 
4331     static __inline LRESULT MSGDUMP_API
4332     MD_TreeView_OnGetItemPartRect(HWND hwnd, WPARAM wParam, LPARAM lParam)
4333     {
4334         MSGDUMP_TPRINTF(TEXT("%sTVM_GETITEMPARTRECT(hwnd:%p, wParam:%p, lParam:%p)\n"),
4335                         MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
4336         return 0;
4337     }
4338 #endif
4339 
4340 static __inline LRESULT MSGDUMP_API
4341 MD_RichEdit_OnCanPaste(HWND hwnd, UINT uFormat)
4342 {
4343     MSGDUMP_TPRINTF(TEXT("%sEM_CANPASTE(hwnd:%p, uFormat:%u)\n"),
4344                     MSGDUMP_PREFIX, (void *)hwnd, uFormat);
4345     return 0;
4346 }
4347 
4348 static __inline BOOL MSGDUMP_API
4349 MD_RichEdit_OnDisplayBand(HWND hwnd, LPRECT lprc)
4350 {
4351     MSGDUMP_TPRINTF(TEXT("%sEM_DISPLAYBAND(hwnd:%p, lprc:%p)\n"),
4352                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lprc);
4353     return FALSE;
4354 }
4355 
4356 static __inline void MSGDUMP_API
4357 MD_RichEdit_OnExGetSel(HWND hwnd, CHARRANGE *lpchr)
4358 {
4359     MSGDUMP_TPRINTF(TEXT("%sEM_EXGETSEL(hwnd:%p, lpchr:%p)\n"),
4360                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpchr);
4361 }
4362 
4363 static __inline void MSGDUMP_API
4364 MD_RichEdit_OnExLimitText(HWND hwnd, DWORD cchTextMax)
4365 {
4366     MSGDUMP_TPRINTF(TEXT("%sEM_EXLIMITTEXT(hwnd:%p, cchTextMax:%ld)\n"),
4367                     MSGDUMP_PREFIX, (void *)hwnd, cchTextMax);
4368 }
4369 
4370 static __inline INT MSGDUMP_API
4371 MD_RichEdit_OnExLineFromChar(HWND hwnd, DWORD ichCharPos)
4372 {
4373     MSGDUMP_TPRINTF(TEXT("%sEM_EXLINEFROMCHAR(hwnd:%p, ichCharPos:0x%08lX)\n"),
4374                     MSGDUMP_PREFIX, (void *)hwnd, ichCharPos);
4375     return 0;
4376 }
4377 
4378 static __inline INT MSGDUMP_API
4379 MD_RichEdit_OnExSetSel(HWND hwnd, INT ichChar)
4380 {
4381     MSGDUMP_TPRINTF(TEXT("%sEM_EXSETSEL(hwnd:%p, ichChar:%d)\n"),
4382                     MSGDUMP_PREFIX, (void *)hwnd, ichChar);
4383     return 0;
4384 }
4385 
4386 static __inline INT MSGDUMP_API
4387 MD_RichEdit_OnFindText(HWND hwnd, UINT fuFlags, FINDTEXT *lpFindText)
4388 {
4389     MSGDUMP_TPRINTF(TEXT("%sEM_FINDTEXT(hwnd:%p, fuFlags:%u, lpFindText:%p)\n"),
4390                     MSGDUMP_PREFIX, (void *)hwnd, fuFlags, (void *)lpFindText);
4391     return 0;
4392 }
4393 
4394 static __inline INT MSGDUMP_API
4395 MD_RichEdit_OnFormatRange(HWND hwnd, BOOL fRender, FORMATRANGE *lpFmt)
4396 {
4397     MSGDUMP_TPRINTF(TEXT("%sEM_FORMATRANGE(hwnd:%p, fRender:%d, lpFmt:%p)\n"),
4398                     MSGDUMP_PREFIX, (void *)hwnd, fRender, (void *)lpFmt);
4399     return 0;
4400 }
4401 
4402 static __inline DWORD MSGDUMP_API
4403 MD_RichEdit_OnGetCharFormat(HWND hwnd, BOOL fSelection, CHARFORMAT *lpFmt)
4404 {
4405     MSGDUMP_TPRINTF(TEXT("%sEM_GETCHARFORMAT(hwnd:%p, fSelection:%d, lpFmt:%p)\n"),
4406                     MSGDUMP_PREFIX, (void *)hwnd, fSelection, (void *)lpFmt);
4407     return 0;
4408 }
4409 
4410 static __inline DWORD MSGDUMP_API
4411 MD_RichEdit_OnGetEventMask(HWND hwnd)
4412 {
4413     MSGDUMP_TPRINTF(TEXT("%sEM_GETEVENTMASK(hwnd:%p)\n"),
4414                     MSGDUMP_PREFIX, (void *)hwnd);
4415     return 0;
4416 }
4417 
4418 static __inline BOOL MSGDUMP_API
4419 MD_RichEdit_OnGetOleInterface(HWND hwnd, LPVOID *ppObject)
4420 {
4421     MSGDUMP_TPRINTF(TEXT("%sEM_GETOLEINTERFACE(hwnd:%p, ppObject:%p)\n"),
4422                     MSGDUMP_PREFIX, (void *)hwnd, (void *)ppObject);
4423     return FALSE;
4424 }
4425 
4426 static __inline DWORD MSGDUMP_API
4427 MD_RichEdit_OnGetParaFormat(HWND hwnd, PARAFORMAT *lpFmt)
4428 {
4429     MSGDUMP_TPRINTF(TEXT("%sEM_GETPARAFORMAT(hwnd:%p, lpFmt:%p)\n"),
4430                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpFmt);
4431     return 0;
4432 }
4433 
4434 static __inline INT MSGDUMP_API
4435 MD_RichEdit_OnGetSelText(HWND hwnd, LPTSTR lpBuf)
4436 {
4437     MSGDUMP_TPRINTF(TEXT("%sEM_GETSELTEXT(hwnd:%p, lpBuf:%p)\n"),
4438                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpBuf);
4439     return 0;
4440 }
4441 
4442 static __inline void MSGDUMP_API
4443 MD_RichEdit_OnHideSelection(HWND hwnd, BOOL fHide, BOOL fChangeStyle)
4444 {
4445     MSGDUMP_TPRINTF(TEXT("%sEM_HIDESELECTION(hwnd:%p, fHide:%d, fChangeStyle:%d)\n"),
4446                     MSGDUMP_PREFIX, (void *)hwnd, fHide, fChangeStyle);
4447 }
4448 
4449 static __inline void MSGDUMP_API
4450 MD_RichEdit_OnPasteSpecial(HWND hwnd, UINT uFormat, REPASTESPECIAL *lpRePasteSpecial)
4451 {
4452     MSGDUMP_TPRINTF(TEXT("%sEM_PASTESPECIAL(hwnd:%p, uFormat:%u, lpRePasteSpecial:%p)\n"),
4453                     MSGDUMP_PREFIX, (void *)hwnd, uFormat, (void *)lpRePasteSpecial);
4454 }
4455 
4456 static __inline void MSGDUMP_API
4457 MD_RichEdit_OnRequestResize(HWND hwnd)
4458 {
4459     MSGDUMP_TPRINTF(TEXT("%sEM_REQUESTRESIZE(hwnd:%p)\n"),
4460                     MSGDUMP_PREFIX, (void *)hwnd);
4461 }
4462 
4463 static __inline DWORD MSGDUMP_API
4464 MD_RichEdit_OnSelectionType(HWND hwnd)
4465 {
4466     MSGDUMP_TPRINTF(TEXT("%sEM_SELECTIONTYPE(hwnd:%p)\n"),
4467                     MSGDUMP_PREFIX, (void *)hwnd);
4468     return 0;
4469 }
4470 
4471 static __inline COLORREF MSGDUMP_API
4472 MD_RichEdit_OnSetBkgndColor(HWND hwnd, BOOL fUseSysColor, COLORREF clr)
4473 {
4474     MSGDUMP_TPRINTF(TEXT("%sEM_SETBKGNDCOLOR(hwnd:%p, fUseSysColor:%d, clr:0x%08lX)\n"),
4475                     MSGDUMP_PREFIX, (void *)hwnd, fUseSysColor, clr);
4476     return 0;
4477 }
4478 
4479 static __inline BOOL MSGDUMP_API
4480 MD_RichEdit_OnSetCharFormat(HWND hwnd, UINT uFlags, CHARFORMAT *lpFmt)
4481 {
4482     MSGDUMP_TPRINTF(TEXT("%sEM_SETCHARFORMAT(hwnd:%p, uFlags:%u, lpFmt:%p)\n"),
4483                     MSGDUMP_PREFIX, (void *)hwnd, uFlags, (void *)lpFmt);
4484     return FALSE;
4485 }
4486 
4487 static __inline DWORD MSGDUMP_API
4488 MD_RichEdit_OnSetEventMask(HWND hwnd, DWORD dwMask)
4489 {
4490     MSGDUMP_TPRINTF(TEXT("%sEM_SETEVENTMASK(hwnd:%p, dwMask:0x%08lX)\n"),
4491                     MSGDUMP_PREFIX, (void *)hwnd, dwMask);
4492     return 0;
4493 }
4494 
4495 static __inline BOOL MSGDUMP_API
4496 MD_RichEdit_OnSetOleCallback(HWND hwnd, void *pCallback)
4497 {
4498     MSGDUMP_TPRINTF(TEXT("%sEM_SETOLECALLBACK(hwnd:%p, pCallback:%p)\n"),
4499                     MSGDUMP_PREFIX, (void *)hwnd, pCallback);
4500     return FALSE;
4501 }
4502 
4503 static __inline BOOL MSGDUMP_API
4504 MD_RichEdit_OnSetParaFormat(HWND hwnd, PARAFORMAT *lpFmt)
4505 {
4506     MSGDUMP_TPRINTF(TEXT("%sEM_SETPARAFORMAT(hwnd:%p, lpFmt:%p)\n"),
4507                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpFmt);
4508     return FALSE;
4509 }
4510 
4511 static __inline BOOL MSGDUMP_API
4512 MD_RichEdit_OnSetTargetDevice(HWND hwnd, HDC hdcTarget, INT cxLineWidth)
4513 {
4514     MSGDUMP_TPRINTF(TEXT("%sEM_SETTARGETDEVICE(hwnd:%p, hdcTarget:%p, cxLineWidth:%d)\n"),
4515                     MSGDUMP_PREFIX, (void *)hwnd, (void *)hdcTarget, cxLineWidth);
4516     return FALSE;
4517 }
4518 
4519 static __inline DWORD MSGDUMP_API
4520 MD_RichEdit_OnStreamIn(HWND hwnd, UINT uFormat, EDITSTREAM *lpStream)
4521 {
4522     MSGDUMP_TPRINTF(TEXT("%sEM_STREAMIN(hwnd:%p, uFormat:%u, lpStream:%p)\n"),
4523                     MSGDUMP_PREFIX, (void *)hwnd, uFormat, (void *)lpStream);
4524     return 0;
4525 }
4526 
4527 static __inline DWORD MSGDUMP_API
4528 MD_RichEdit_OnStreamOut(HWND hwnd, UINT uFormat, EDITSTREAM *lpStream)
4529 {
4530     MSGDUMP_TPRINTF(TEXT("%sEM_STREAMOUT(hwnd:%p, uFormat:%u, lpStream:%p)\n"),
4531                     MSGDUMP_PREFIX, (void *)hwnd, uFormat, (void *)lpStream);
4532     return 0;
4533 }
4534 
4535 static __inline DWORD MSGDUMP_API
4536 MD_RichEdit_OnGetTextRange(HWND hwnd, TEXTRANGE *lpRange)
4537 {
4538     MSGDUMP_TPRINTF(TEXT("%sEM_GETTEXTRANGE(hwnd:%p, lpRange:%p)\n"),
4539                     MSGDUMP_PREFIX, (void *)hwnd, (void *)lpRange);
4540     return 0;
4541 }
4542 
4543 static __inline DWORD MSGDUMP_API
4544 MD_RichEdit_OnFindWordBreak(HWND hwnd, UINT code, DWORD ichStart)
4545 {
4546     MSGDUMP_TPRINTF(TEXT("%sEM_FINDWORDBREAK(hwnd:%p, code:%u, ichStart:0x%08lX)\n"),
4547                     MSGDUMP_PREFIX, (void *)hwnd, code, ichStart);
4548     return 0;
4549 }
4550 
4551 static __inline UINT MSGDUMP_API
4552 MD_RichEdit_OnSetOptions(HWND hwnd, UINT fOperation, UINT fOptions)
4553 {
4554     MSGDUMP_TPRINTF(TEXT("%sEM_SETOPTIONS(hwnd:%p, fOperation:%u, fOptions:%u)\n"),
4555                     MSGDUMP_PREFIX, (void *)hwnd, fOperation, fOptions);
4556     return 0;
4557 }
4558 
4559 static __inline UINT MSGDUMP_API
4560 MD_RichEdit_OnGetOptions(HWND hwnd)
4561 {
4562     MSGDUMP_TPRINTF(TEXT("%sEM_GETOPTIONS(hwnd:%p)\n"),
4563                     MSGDUMP_PREFIX, (void *)hwnd);
4564     return 0;
4565 }
4566 
4567 static __inline INT MSGDUMP_API
4568 MD_RichEdit_OnFindTextEx(HWND hwnd, UINT fuFlags, FINDTEXTEX *lpFindText)
4569 {
4570     MSGDUMP_TPRINTF(TEXT("%sEM_FINDTEXTEX(hwnd:%p, fuFlags:%u, lpFindText:%p)\n"),
4571                     MSGDUMP_PREFIX, (void *)hwnd, fuFlags, (void *)lpFindText);
4572     return 0;
4573 }
4574 
4575 static __inline void *MSGDUMP_API
4576 MD_RichEdit_OnGetWordBreakProcEx(HWND hwnd)
4577 {
4578     MSGDUMP_TPRINTF(TEXT("%sEM_GETWORDBREAKPROC(hwnd:%p)\n"),
4579                     MSGDUMP_PREFIX, (void *)hwnd);
4580     return NULL;
4581 }
4582 
4583 static __inline void *MSGDUMP_API
4584 MD_RichEdit_OnSetWordBreakProcEx(HWND hwnd, void *pfn)
4585 {
4586     MSGDUMP_TPRINTF(TEXT("%sEM_SETWORDBREAKPROC(hwnd:%p, pfn:%p)\n"),
4587                     MSGDUMP_PREFIX, (void *)hwnd, pfn);
4588     return NULL;
4589 }
4590 
4591 static __inline DWORD MSGDUMP_API
4592 MD_RichEdit_OnSetUndoLimit(HWND hwnd, DWORD dwMaxUndo)
4593 {
4594     MSGDUMP_TPRINTF(TEXT("%sEM_SETUNDOLIMIT(hwnd:%p, dwMaxUndo:%ld)\n"),
4595                     MSGDUMP_PREFIX, (void *)hwnd, dwMaxUndo);
4596     return 0;
4597 }
4598 
4599 static __inline BOOL MSGDUMP_API
4600 MD_RichEdit_OnRedo(HWND hwnd)
4601 {
4602     MSGDUMP_TPRINTF(TEXT("%sEM_REDO(hwnd:%p)\n"),
4603                     MSGDUMP_PREFIX, (void *)hwnd);
4604     return FALSE;
4605 }
4606 
4607 static __inline BOOL MSGDUMP_API
4608 MD_RichEdit_OnCanRedo(HWND hwnd)
4609 {
4610     MSGDUMP_TPRINTF(TEXT("%sEM_CANREDO(hwnd:%p)\n"),
4611                     MSGDUMP_PREFIX, (void *)hwnd);
4612     return FALSE;
4613 }
4614 
4615 static __inline INT MSGDUMP_API
4616 MD_RichEdit_OnGetUndoName(HWND hwnd)
4617 {
4618     MSGDUMP_TPRINTF(TEXT("%sEM_GETUNDONAME(hwnd:%p)\n"),
4619                     MSGDUMP_PREFIX, (void *)hwnd);
4620     return 0;
4621 }
4622 
4623 static __inline INT MSGDUMP_API
4624 MD_RichEdit_OnGetRedoName(HWND hwnd)
4625 {
4626     MSGDUMP_TPRINTF(TEXT("%sEM_GETREDONAME(hwnd:%p)\n"),
4627                     MSGDUMP_PREFIX, (void *)hwnd);
4628     return 0;
4629 }
4630 
4631 static __inline void MSGDUMP_API
4632 MD_RichEdit_OnStopGroupTyping(HWND hwnd)
4633 {
4634     MSGDUMP_TPRINTF(TEXT("%sEM_STOPGROUPTYPING(hwnd:%p)\n"),
4635                     MSGDUMP_PREFIX, (void *)hwnd);
4636 }
4637 
4638 static __inline BOOL MSGDUMP_API
4639 MD_RichEdit_OnSetTextMode(HWND hwnd, DWORD dwTextMode)
4640 {
4641     MSGDUMP_TPRINTF(TEXT("%sEM_SETTEXTMODE(hwnd:%p, dwTextMode:0x%08lX)\n"),
4642                     MSGDUMP_PREFIX, (void *)hwnd, dwTextMode);
4643     return FALSE;
4644 }
4645 
4646 static __inline DWORD MSGDUMP_API
4647 MD_RichEdit_OnGetTextMode(HWND hwnd)
4648 {
4649     MSGDUMP_TPRINTF(TEXT("%sEM_GETTEXTMODE(hwnd:%p)\n"),
4650                     MSGDUMP_PREFIX, (void *)hwnd);
4651     return 0;
4652 }
4653 
4654 static __inline LRESULT MSGDUMP_API
4655 MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
4656 {
4657     TCHAR szClass[24], sz[2], szMsg[64];
4658     szClass[0] = 0;
4659     GetClassName(hwnd, szClass, ARRAYSIZE(szClass));
4660     sz[0] = szClass[0];
4661     sz[1] = 0;
4662     CharUpper(sz);
4663 
4664     if (sz[0] == TEXT('R') && lstrcmpi(szClass, RICHEDIT_CLASS) == 0)
4665     {
4666         switch (uMsg)
4667         {
4668             HANDLE_MSG(hwnd, EM_CANPASTE, MD_RichEdit_OnCanPaste);
4669             HANDLE_MSG(hwnd, EM_DISPLAYBAND, MD_RichEdit_OnDisplayBand);
4670             HANDLE_MSG(hwnd, EM_EXGETSEL, MD_RichEdit_OnExGetSel);
4671             HANDLE_MSG(hwnd, EM_EXLIMITTEXT, MD_RichEdit_OnExLimitText);
4672             HANDLE_MSG(hwnd, EM_EXLINEFROMCHAR, MD_RichEdit_OnExLineFromChar);
4673             HANDLE_MSG(hwnd, EM_EXSETSEL, MD_RichEdit_OnExSetSel);
4674             HANDLE_MSG(hwnd, EM_FINDTEXT, MD_RichEdit_OnFindText);
4675             HANDLE_MSG(hwnd, EM_FORMATRANGE, MD_RichEdit_OnFormatRange);
4676             HANDLE_MSG(hwnd, EM_GETCHARFORMAT, MD_RichEdit_OnGetCharFormat);
4677             HANDLE_MSG(hwnd, EM_GETEVENTMASK, MD_RichEdit_OnGetEventMask);
4678             HANDLE_MSG(hwnd, EM_GETOLEINTERFACE, MD_RichEdit_OnGetOleInterface);
4679             HANDLE_MSG(hwnd, EM_GETPARAFORMAT, MD_RichEdit_OnGetParaFormat);
4680             HANDLE_MSG(hwnd, EM_GETSELTEXT, MD_RichEdit_OnGetSelText);
4681             HANDLE_MSG(hwnd, EM_HIDESELECTION, MD_RichEdit_OnHideSelection);
4682             HANDLE_MSG(hwnd, EM_PASTESPECIAL, MD_RichEdit_OnPasteSpecial);
4683             HANDLE_MSG(hwnd, EM_REQUESTRESIZE, MD_RichEdit_OnRequestResize);
4684             HANDLE_MSG(hwnd, EM_SELECTIONTYPE, MD_RichEdit_OnSelectionType);
4685             HANDLE_MSG(hwnd, EM_SETBKGNDCOLOR, MD_RichEdit_OnSetBkgndColor);
4686             HANDLE_MSG(hwnd, EM_SETCHARFORMAT, MD_RichEdit_OnSetCharFormat);
4687             HANDLE_MSG(hwnd, EM_SETEVENTMASK, MD_RichEdit_OnSetEventMask);
4688             HANDLE_MSG(hwnd, EM_SETOLECALLBACK, MD_RichEdit_OnSetOleCallback);
4689             HANDLE_MSG(hwnd, EM_SETPARAFORMAT, MD_RichEdit_OnSetParaFormat);
4690             HANDLE_MSG(hwnd, EM_SETTARGETDEVICE, MD_RichEdit_OnSetTargetDevice);
4691             HANDLE_MSG(hwnd, EM_STREAMIN, MD_RichEdit_OnStreamIn);
4692             HANDLE_MSG(hwnd, EM_STREAMOUT, MD_RichEdit_OnStreamOut);
4693             HANDLE_MSG(hwnd, EM_GETTEXTRANGE, MD_RichEdit_OnGetTextRange);
4694             HANDLE_MSG(hwnd, EM_FINDWORDBREAK, MD_RichEdit_OnFindWordBreak);
4695             HANDLE_MSG(hwnd, EM_SETOPTIONS, MD_RichEdit_OnSetOptions);
4696             HANDLE_MSG(hwnd, EM_GETOPTIONS, MD_RichEdit_OnGetOptions);
4697             HANDLE_MSG(hwnd, EM_FINDTEXTEX, MD_RichEdit_OnFindTextEx);
4698             HANDLE_MSG(hwnd, EM_GETWORDBREAKPROCEX, MD_RichEdit_OnGetWordBreakProcEx);
4699             HANDLE_MSG(hwnd, EM_SETWORDBREAKPROCEX, MD_RichEdit_OnSetWordBreakProcEx);
4700             HANDLE_MSG(hwnd, EM_SETUNDOLIMIT, MD_RichEdit_OnSetUndoLimit);
4701             HANDLE_MSG(hwnd, EM_REDO, MD_RichEdit_OnRedo);
4702             HANDLE_MSG(hwnd, EM_CANREDO, MD_RichEdit_OnCanRedo);
4703             HANDLE_MSG(hwnd, EM_GETUNDONAME, MD_RichEdit_OnGetUndoName);
4704             HANDLE_MSG(hwnd, EM_GETREDONAME, MD_RichEdit_OnGetRedoName);
4705             HANDLE_MSG(hwnd, EM_STOPGROUPTYPING, MD_RichEdit_OnStopGroupTyping);
4706             HANDLE_MSG(hwnd, EM_SETTEXTMODE, MD_RichEdit_OnSetTextMode);
4707             HANDLE_MSG(hwnd, EM_GETTEXTMODE, MD_RichEdit_OnGetTextMode);
4708         }
4709     }
4710 
4711     if ((sz[0] == TEXT('E') && lstrcmpi(szClass, TEXT("EDIT")) == 0) ||
4712         (sz[0] == TEXT('R') && lstrcmpi(szClass, RICHEDIT_CLASS) == 0))
4713     {
4714         switch (uMsg)
4715         {
4716             HANDLE_MSG(hwnd, EM_GETSEL, MD_Edit_OnGetSel);
4717             HANDLE_MSG(hwnd, EM_SETSEL, MD_Edit_OnSetSel);
4718             HANDLE_MSG(hwnd, EM_GETRECT, MD_Edit_OnGetRect);
4719             HANDLE_MSG(hwnd, EM_SETRECT, MD_Edit_OnSetRect);
4720             HANDLE_MSG(hwnd, EM_SETRECTNP, MD_Edit_OnSetRectNP);
4721             HANDLE_MSG(hwnd, EM_SCROLL, MD_Edit_OnScroll);
4722             HANDLE_MSG(hwnd, EM_LINESCROLL, MD_Edit_OnLineScroll);
4723             HANDLE_MSG(hwnd, EM_SCROLLCARET, MD_Edit_OnScrollCaret);
4724             HANDLE_MSG(hwnd, EM_GETMODIFY, MD_Edit_OnGetModify);
4725             HANDLE_MSG(hwnd, EM_SETMODIFY, MD_Edit_OnSetModify);
4726             HANDLE_MSG(hwnd, EM_GETLINECOUNT, MD_Edit_OnGetLineCount);
4727             HANDLE_MSG(hwnd, EM_LINEINDEX, MD_Edit_OnLineIndex);
4728             HANDLE_MSG(hwnd, EM_SETHANDLE, MD_Edit_OnSetHandle);
4729             HANDLE_MSG(hwnd, EM_GETHANDLE, MD_Edit_OnGetHandle);
4730             HANDLE_MSG(hwnd, EM_GETTHUMB, MD_Edit_OnGetThumb);
4731             HANDLE_MSG(hwnd, EM_LINELENGTH, MD_Edit_OnLineLength);
4732             HANDLE_MSG(hwnd, EM_REPLACESEL, MD_Edit_OnReplaceSel);
4733             HANDLE_MSG(hwnd, EM_GETLINE, MD_Edit_OnGetLine);
4734             HANDLE_MSG(hwnd, EM_CANUNDO, MD_Edit_OnCanUndo);
4735             HANDLE_MSG(hwnd, EM_UNDO, MD_Edit_OnUndo);
4736             HANDLE_MSG(hwnd, EM_FMTLINES, MD_Edit_OnFmtLines);
4737             HANDLE_MSG(hwnd, EM_LINEFROMCHAR, MD_Edit_OnLineFromChar);
4738             HANDLE_MSG(hwnd, EM_SETTABSTOPS, MD_Edit_OnSetTabStops);
4739             HANDLE_MSG(hwnd, EM_SETPASSWORDCHAR, MD_Edit_OnSetPasswordChar);
4740             HANDLE_MSG(hwnd, EM_EMPTYUNDOBUFFER, MD_Edit_OnEmptyUndoBuffer);
4741             HANDLE_MSG(hwnd, EM_GETFIRSTVISIBLELINE, MD_Edit_OnGetFirstVisibleLine);
4742             HANDLE_MSG(hwnd, EM_SETREADONLY, MD_Edit_OnSetReadOnly);
4743             HANDLE_MSG(hwnd, EM_SETWORDBREAKPROC, MD_Edit_OnSetWordBreakProc);
4744             HANDLE_MSG(hwnd, EM_GETWORDBREAKPROC, MD_Edit_OnGetWordBreakProc);
4745             HANDLE_MSG(hwnd, EM_GETPASSWORDCHAR, MD_Edit_OnGetPasswordChar);
4746             HANDLE_MSG(hwnd, EM_SETMARGINS, MD_Edit_OnSetMargins);
4747             HANDLE_MSG(hwnd, EM_GETMARGINS, MD_Edit_OnGetMargins);
4748             HANDLE_MSG(hwnd, EM_SETLIMITTEXT, MD_Edit_OnSetLimitText);
4749             HANDLE_MSG(hwnd, EM_GETLIMITTEXT, MD_Edit_OnGetLimitText);
4750             HANDLE_MSG(hwnd, EM_POSFROMCHAR, MD_Edit_OnPosFromChar);
4751             HANDLE_MSG(hwnd, EM_CHARFROMPOS, MD_Edit_OnCharFromPos);
4752             HANDLE_MSG(hwnd, EM_SETIMESTATUS, MD_Edit_OnSetIMEStatus);
4753             HANDLE_MSG(hwnd, EM_GETIMESTATUS, MD_Edit_OnGetIMEStatus);
4754         }
4755     }
4756     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, TEXT("STATIC")) == 0)
4757     {
4758         switch (uMsg)
4759         {
4760             HANDLE_MSG(hwnd, STM_SETICON, MD_Static_OnSetIcon);
4761             HANDLE_MSG(hwnd, STM_GETICON, MD_Static_OnGetIcon);
4762             HANDLE_MSG(hwnd, STM_SETIMAGE, MD_Static_OnSetImage);
4763             HANDLE_MSG(hwnd, STM_GETIMAGE, MD_Static_OnGetImage);
4764         }
4765     }
4766     else if (sz[0] == TEXT('L') && lstrcmpi(szClass, TEXT("LISTBOX")) == 0)
4767     {
4768         switch (uMsg)
4769         {
4770             HANDLE_MSG(hwnd, LB_ADDSTRING, MD_ListBox_OnAddString);
4771             HANDLE_MSG(hwnd, LB_INSERTSTRING, MD_ListBox_OnInsertString);
4772             HANDLE_MSG(hwnd, LB_DELETESTRING, MD_ListBox_OnDeleteString);
4773             HANDLE_MSG(hwnd, LB_SELITEMRANGEEX, MD_ListBox_OnSelItemRangeEx);
4774             HANDLE_MSG(hwnd, LB_RESETCONTENT, MD_ListBox_OnResetContent);
4775             HANDLE_MSG(hwnd, LB_SETSEL, MD_ListBox_OnSetSel);
4776             HANDLE_MSG(hwnd, LB_SETCURSEL, MD_ListBox_OnSetCurSel);
4777             HANDLE_MSG(hwnd, LB_GETSEL, MD_ListBox_OnGetSel);
4778             HANDLE_MSG(hwnd, LB_GETCURSEL, MD_ListBox_OnGetCurSel);
4779             HANDLE_MSG(hwnd, LB_GETTEXT, MD_ListBox_OnGetText);
4780             HANDLE_MSG(hwnd, LB_GETTEXTLEN, MD_ListBox_OnGetTextLen);
4781             HANDLE_MSG(hwnd, LB_GETCOUNT, MD_ListBox_OnGetCount);
4782             HANDLE_MSG(hwnd, LB_SELECTSTRING, MD_ListBox_OnSelectString);
4783             HANDLE_MSG(hwnd, LB_DIR, MD_ListBox_OnDir);
4784             HANDLE_MSG(hwnd, LB_GETTOPINDEX, MD_ListBox_OnGetTopIndex);
4785             HANDLE_MSG(hwnd, LB_FINDSTRING, MD_ListBox_OnFindString);
4786             HANDLE_MSG(hwnd, LB_GETSELCOUNT, MD_ListBox_OnGetSelCount);
4787             HANDLE_MSG(hwnd, LB_GETSELITEMS, MD_ListBox_OnGetSelItems);
4788             HANDLE_MSG(hwnd, LB_SETTABSTOPS, MD_ListBox_OnSetTabStops);
4789             HANDLE_MSG(hwnd, LB_GETHORIZONTALEXTENT, MD_ListBox_OnGetHorizontalExtent);
4790             HANDLE_MSG(hwnd, LB_SETHORIZONTALEXTENT, MD_ListBox_OnSetHorizontalExtent);
4791             HANDLE_MSG(hwnd, LB_SETCOLUMNWIDTH, MD_ListBox_OnSetColumnWidth);
4792             HANDLE_MSG(hwnd, LB_ADDFILE, MD_ListBox_OnAddFile);
4793             HANDLE_MSG(hwnd, LB_SETTOPINDEX, MD_ListBox_OnSetTopIndex);
4794             HANDLE_MSG(hwnd, LB_GETITEMRECT, MD_ListBox_OnGetItemRect);
4795             HANDLE_MSG(hwnd, LB_GETITEMDATA, MD_ListBox_OnGetItemData);
4796             HANDLE_MSG(hwnd, LB_SETITEMDATA, MD_ListBox_OnSetItemData);
4797             HANDLE_MSG(hwnd, LB_SELITEMRANGE, MD_ListBox_OnSelItemRange);
4798             HANDLE_MSG(hwnd, LB_SETANCHORINDEX, MD_ListBox_OnSetAnchorIndex);
4799             HANDLE_MSG(hwnd, LB_GETANCHORINDEX, MD_ListBox_OnGetAnchorIndex);
4800             HANDLE_MSG(hwnd, LB_SETCARETINDEX, MD_ListBox_OnSetCaretIndex);
4801             HANDLE_MSG(hwnd, LB_GETCARETINDEX, MD_ListBox_OnGetCaretIndex);
4802             HANDLE_MSG(hwnd, LB_SETITEMHEIGHT, MD_ListBox_OnSetItemHeight);
4803             HANDLE_MSG(hwnd, LB_GETITEMHEIGHT, MD_ListBox_OnGetItemHeight);
4804             HANDLE_MSG(hwnd, LB_FINDSTRINGEXACT, MD_ListBox_OnFindStringExact);
4805             HANDLE_MSG(hwnd, LB_SETLOCALE, MD_ListBox_OnSetLocale);
4806             HANDLE_MSG(hwnd, LB_GETLOCALE, MD_ListBox_OnGetLocale);
4807             HANDLE_MSG(hwnd, LB_SETCOUNT, MD_ListBox_OnSetCount);
4808             HANDLE_MSG(hwnd, LB_INITSTORAGE, MD_ListBox_OnInitStorage);
4809             HANDLE_MSG(hwnd, LB_ITEMFROMPOINT, MD_ListBox_OnItemFromPoint);
4810         }
4811     }
4812     else if (sz[0] == TEXT('C') && lstrcmpi(szClass, TEXT("COMBOBOX")) == 0)
4813     {
4814         switch (uMsg)
4815         {
4816             HANDLE_MSG(hwnd, CB_GETEDITSEL, MD_ComboBox_OnGetEditSel);
4817             HANDLE_MSG(hwnd, CB_LIMITTEXT, MD_ComboBox_OnLimitText);
4818             HANDLE_MSG(hwnd, CB_SETEDITSEL, MD_ComboBox_OnSetEditSel);
4819             HANDLE_MSG(hwnd, CB_ADDSTRING, MD_ComboBox_OnAddString);
4820             HANDLE_MSG(hwnd, CB_DELETESTRING, MD_ComboBox_OnDeleteString);
4821             HANDLE_MSG(hwnd, CB_DIR, MD_ComboBox_OnDir);
4822             HANDLE_MSG(hwnd, CB_GETCOUNT, MD_ComboBox_OnGetCount);
4823             HANDLE_MSG(hwnd, CB_GETCURSEL, MD_ComboBox_GetCurSel);
4824             HANDLE_MSG(hwnd, CB_GETLBTEXT, MD_ComboBox_GetLBText);
4825             HANDLE_MSG(hwnd, CB_GETLBTEXTLEN, MD_ComboBox_OnGetLBTextLen);
4826             HANDLE_MSG(hwnd, CB_INSERTSTRING, MD_ComboBox_OnInsertString);
4827             HANDLE_MSG(hwnd, CB_RESETCONTENT, MD_ComboBox_OnResetContent);
4828             HANDLE_MSG(hwnd, CB_FINDSTRING, MD_ComboBox_OnFindString);
4829             HANDLE_MSG(hwnd, CB_SELECTSTRING, MD_ComboBox_OnSelectString);
4830             HANDLE_MSG(hwnd, CB_SETCURSEL, MD_ComboBox_OnSetCurSel);
4831             HANDLE_MSG(hwnd, CB_SHOWDROPDOWN, MD_ComboBox_OnShowDropDown);
4832             HANDLE_MSG(hwnd, CB_GETITEMDATA, MD_ComboBox_OnGetItemData);
4833             HANDLE_MSG(hwnd, CB_SETITEMDATA, MD_ComboBox_OnSetItemData);
4834             HANDLE_MSG(hwnd, CB_GETDROPPEDCONTROLRECT, MD_ComboBox_OnGetDroppedControlRect);
4835             HANDLE_MSG(hwnd, CB_SETITEMHEIGHT, MD_ComboBox_OnSetItemHeight);
4836             HANDLE_MSG(hwnd, CB_GETITEMHEIGHT, MD_ComboBox_OnGetItemHeight);
4837             HANDLE_MSG(hwnd, CB_SETEXTENDEDUI, MD_ComboBox_OnSetExtendedUI);
4838             HANDLE_MSG(hwnd, CB_GETEXTENDEDUI, MD_ComboBox_OnGetExtendedUI);
4839             HANDLE_MSG(hwnd, CB_GETDROPPEDSTATE, MD_ComboBox_OnGetDroppedState);
4840             HANDLE_MSG(hwnd, CB_FINDSTRINGEXACT, MD_ComboBox_OnFindStringExact);
4841             HANDLE_MSG(hwnd, CB_SETLOCALE, MD_ComboBox_OnSetLocale);
4842             HANDLE_MSG(hwnd, CB_GETLOCALE, MD_ComboBox_OnGetLocale);
4843             HANDLE_MSG(hwnd, CB_GETTOPINDEX, MD_ComboBox_OnGetTopIndex);
4844             HANDLE_MSG(hwnd, CB_SETTOPINDEX, MD_ComboBox_OnSetTopIndex);
4845             HANDLE_MSG(hwnd, CB_GETHORIZONTALEXTENT, MD_ComboBox_OnGetHorizontalExtent);
4846             HANDLE_MSG(hwnd, CB_SETHORIZONTALEXTENT, MD_ComboBox_OnSetHorizontalExtent);
4847             HANDLE_MSG(hwnd, CB_GETDROPPEDWIDTH, MD_ComboBox_OnGetDroppedWidth);
4848             HANDLE_MSG(hwnd, CB_SETDROPPEDWIDTH, MD_ComboBox_OnSetDroppedWidth);
4849             HANDLE_MSG(hwnd, CB_INITSTORAGE, MD_ComboBox_OnInitStorage);
4850         }
4851     }
4852     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, TEXT("SCROLLBAR")) == 0)
4853     {
4854         switch (uMsg)
4855         {
4856             HANDLE_MSG(hwnd, SBM_SETPOS, MD_ScrollBar_OnSetPos);
4857             HANDLE_MSG(hwnd, SBM_GETPOS, MD_ScrollBar_OnGetPos);
4858             HANDLE_MSG(hwnd, SBM_SETRANGE, MD_ScrollBar_OnSetRange);
4859             HANDLE_MSG(hwnd, SBM_SETRANGEREDRAW, MD_ScrollBar_OnSetRangeRedraw);
4860             HANDLE_MSG(hwnd, SBM_GETRANGE, MD_ScrollBar_OnGetRange);
4861             HANDLE_MSG(hwnd, SBM_ENABLE_ARROWS, MD_ScrollBar_OnEnableArrows);
4862             HANDLE_MSG(hwnd, SBM_SETSCROLLINFO, MD_ScrollBar_OnSetScrollInfo);
4863             HANDLE_MSG(hwnd, SBM_GETSCROLLINFO, MD_ScrollBar_OnGetScrollInfo);
4864             HANDLE_MSG(hwnd, SBM_GETSCROLLBARINFO, MD_ScrollBar_OnGetScrollBarInfo);
4865         }
4866     }
4867     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_LISTVIEW) == 0)
4868     {
4869         switch (uMsg)
4870         {
4871             HANDLE_MSG(hwnd, LVM_GETBKCOLOR, MD_ListView_OnGetBkColor);
4872             HANDLE_MSG(hwnd, LVM_SETBKCOLOR, MD_ListView_OnSetBkColor);
4873             HANDLE_MSG(hwnd, LVM_GETIMAGELIST, MD_ListView_OnGetImageList);
4874             HANDLE_MSG(hwnd, LVM_SETIMAGELIST, MD_ListView_OnSetImageList);
4875             HANDLE_MSG(hwnd, LVM_GETITEMCOUNT, MD_ListView_OnGetItemCount);
4876             HANDLE_MSG(hwnd, LVM_GETITEMA, MD_ListView_OnGetItemA);
4877             HANDLE_MSG(hwnd, LVM_SETITEMA, MD_ListView_OnSetItemA);
4878             HANDLE_MSG(hwnd, LVM_INSERTITEMA, MD_ListView_OnInsertItemA);
4879             HANDLE_MSG(hwnd, LVM_DELETEITEM, MD_ListView_OnDeleteItem);
4880             HANDLE_MSG(hwnd, LVM_DELETEALLITEMS, MD_ListView_OnDeleteAllItems);
4881             HANDLE_MSG(hwnd, LVM_GETCALLBACKMASK, MD_ListView_OnGetCallbackMask);
4882             HANDLE_MSG(hwnd, LVM_SETCALLBACKMASK, MD_ListView_OnSetCallbackMask);
4883             HANDLE_MSG(hwnd, LVM_GETNEXTITEM, MD_ListView_OnGetNextItem);
4884             HANDLE_MSG(hwnd, LVM_FINDITEMA, MD_ListView_OnFindItemA);
4885             HANDLE_MSG(hwnd, LVM_GETITEMRECT, MD_ListView_OnGetItemRect);
4886             HANDLE_MSG(hwnd, LVM_SETITEMPOSITION, MD_ListView_OnSetItemPosition);
4887             HANDLE_MSG(hwnd, LVM_GETITEMPOSITION, MD_ListView_OnGetItemPosition);
4888             HANDLE_MSG(hwnd, LVM_GETSTRINGWIDTHA, MD_ListView_OnGetStringWidthA);
4889             HANDLE_MSG(hwnd, LVM_HITTEST, MD_ListView_OnHitTest);
4890             HANDLE_MSG(hwnd, LVM_ENSUREVISIBLE, MD_ListView_OnEnsureVisible);
4891             HANDLE_MSG(hwnd, LVM_SCROLL, MD_ListView_OnScroll);
4892             HANDLE_MSG(hwnd, LVM_REDRAWITEMS, MD_ListView_OnRedrawItems);
4893             HANDLE_MSG(hwnd, LVM_ARRANGE, MD_ListView_OnArrange);
4894             HANDLE_MSG(hwnd, LVM_EDITLABELA, MD_ListView_OnEditLabelA);
4895             HANDLE_MSG(hwnd, LVM_GETEDITCONTROL, MD_ListView_OnGetEditControl);
4896             HANDLE_MSG(hwnd, LVM_GETCOLUMNA, MD_ListView_OnGetColumnA);
4897             HANDLE_MSG(hwnd, LVM_SETCOLUMNA, MD_ListView_OnSetColumnA);
4898             HANDLE_MSG(hwnd, LVM_INSERTCOLUMNA, MD_ListView_OnInsertColumnA);
4899             HANDLE_MSG(hwnd, LVM_DELETECOLUMN, MD_ListView_OnDeleteColumn);
4900             HANDLE_MSG(hwnd, LVM_GETCOLUMNWIDTH, MD_ListView_OnGetColumnWidth);
4901             HANDLE_MSG(hwnd, LVM_SETCOLUMNWIDTH, MD_ListView_OnSetColumnWidth);
4902             HANDLE_MSG(hwnd, LVM_GETHEADER, MD_ListView_OnGetHeader);
4903             HANDLE_MSG(hwnd, LVM_CREATEDRAGIMAGE, MD_ListView_OnCreateDragImage);
4904             HANDLE_MSG(hwnd, LVM_GETVIEWRECT, MD_ListView_OnGetViewRect);
4905             HANDLE_MSG(hwnd, LVM_GETTEXTCOLOR, MD_ListView_OnGetTextColor);
4906             HANDLE_MSG(hwnd, LVM_SETTEXTCOLOR, MD_ListView_OnSetTextColor);
4907             HANDLE_MSG(hwnd, LVM_GETTEXTBKCOLOR, MD_ListView_OnGetTextBkColor);
4908             HANDLE_MSG(hwnd, LVM_SETTEXTBKCOLOR, MD_ListView_OnSetTextBkColor);
4909             HANDLE_MSG(hwnd, LVM_GETTOPINDEX, MD_ListView_OnGetTopIndex);
4910             HANDLE_MSG(hwnd, LVM_GETCOUNTPERPAGE, MD_ListView_OnGetCountPerPage);
4911             HANDLE_MSG(hwnd, LVM_GETORIGIN, MD_ListView_OnGetOrigin);
4912             HANDLE_MSG(hwnd, LVM_UPDATE, MD_ListView_OnUpdate);
4913             HANDLE_MSG(hwnd, LVM_SETITEMSTATE, MD_ListView_OnSetItemState);
4914             HANDLE_MSG(hwnd, LVM_GETITEMSTATE, MD_ListView_OnGetItemState);
4915             HANDLE_MSG(hwnd, LVM_GETITEMTEXTA, MD_ListView_OnGetItemTextA);
4916             HANDLE_MSG(hwnd, LVM_SETITEMTEXTA, MD_ListView_OnSetItemTextA);
4917             HANDLE_MSG(hwnd, LVM_SETITEMCOUNT, MD_ListView_OnSetItemCount);
4918             HANDLE_MSG(hwnd, LVM_SORTITEMS, MD_ListView_OnSortItems);
4919             HANDLE_MSG(hwnd, LVM_SETITEMPOSITION32, MD_ListView_OnSetItemPosition32);
4920             HANDLE_MSG(hwnd, LVM_GETSELECTEDCOUNT, MD_ListView_OnGetSelectedCount);
4921             HANDLE_MSG(hwnd, LVM_GETITEMSPACING, MD_ListView_OnGetItemSpacing);
4922             HANDLE_MSG(hwnd, LVM_GETISEARCHSTRINGA, MD_ListView_OnGetISearchStringA);
4923             HANDLE_MSG(hwnd, LVM_SETICONSPACING, MD_ListView_OnSetIconSpacing);
4924             HANDLE_MSG(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, MD_ListView_OnSetExtendedListViewStyle);
4925             HANDLE_MSG(hwnd, LVM_GETEXTENDEDLISTVIEWSTYLE, MD_ListView_OnGetExtendedListViewStyle);
4926             HANDLE_MSG(hwnd, LVM_GETSUBITEMRECT, MD_ListView_OnGetSubItemRect);
4927             HANDLE_MSG(hwnd, LVM_SUBITEMHITTEST, MD_ListView_OnSubItemHitTest);
4928             HANDLE_MSG(hwnd, LVM_SETCOLUMNORDERARRAY, MD_ListView_OnSetColumnOrderArray);
4929             HANDLE_MSG(hwnd, LVM_GETCOLUMNORDERARRAY, MD_ListView_OnGetColumnOrderArray);
4930             HANDLE_MSG(hwnd, LVM_SETHOTITEM, MD_ListView_OnSetHotItem);
4931             HANDLE_MSG(hwnd, LVM_GETHOTITEM, MD_ListView_OnGetHotItem);
4932             HANDLE_MSG(hwnd, LVM_SETHOTCURSOR, MD_ListView_OnSetHotCursor);
4933             HANDLE_MSG(hwnd, LVM_GETHOTCURSOR, MD_ListView_OnGetHotCursor);
4934             HANDLE_MSG(hwnd, LVM_APPROXIMATEVIEWRECT, MD_ListView_OnApproximateViewRect);
4935             HANDLE_MSG(hwnd, LVM_SETWORKAREAS, MD_ListView_OnSetWorkAreas);
4936             HANDLE_MSG(hwnd, LVM_GETSELECTIONMARK, MD_ListView_OnGetSelectionMark);
4937             HANDLE_MSG(hwnd, LVM_SETSELECTIONMARK, MD_ListView_OnSetSelectionMark);
4938             HANDLE_MSG(hwnd, LVM_SETBKIMAGEA, MD_ListView_OnSetBkImageA);
4939             HANDLE_MSG(hwnd, LVM_GETBKIMAGEA, MD_ListView_OnGetBkImageA);
4940             HANDLE_MSG(hwnd, LVM_GETWORKAREAS, MD_ListView_OnGetWorkAreas);
4941             HANDLE_MSG(hwnd, LVM_SETHOVERTIME, MD_ListView_OnSetHoverTime);
4942             HANDLE_MSG(hwnd, LVM_GETHOVERTIME, MD_ListView_OnGetHoverTime);
4943             HANDLE_MSG(hwnd, LVM_GETNUMBEROFWORKAREAS, MD_ListView_OnGetNumberOfWorkAreas);
4944             HANDLE_MSG(hwnd, LVM_SETTOOLTIPS, MD_ListView_OnSetToolTips);
4945             HANDLE_MSG(hwnd, LVM_GETITEMW, MD_ListView_OnGetItemW);
4946             HANDLE_MSG(hwnd, LVM_SETITEMW, MD_ListView_OnSetItemW);
4947             HANDLE_MSG(hwnd, LVM_INSERTITEMW, MD_ListView_OnInsertItemW);
4948             HANDLE_MSG(hwnd, LVM_GETTOOLTIPS, MD_ListView_OnGetToolTips);
4949             HANDLE_MSG(hwnd, LVM_SORTITEMSEX, MD_ListView_OnSortItemsEx);
4950             HANDLE_MSG(hwnd, LVM_FINDITEMW, MD_ListView_OnFindItemW);
4951             HANDLE_MSG(hwnd, LVM_GETSTRINGWIDTHW, MD_ListView_OnGetStringWidthW);
4952 #if NTDDI_VERSION >= 0x06000000
4953             HANDLE_MSG(hwnd, LVM_GETGROUPSTATE, MD_ListView_OnGetGroupState);
4954             HANDLE_MSG(hwnd, LVM_GETFOCUSEDGROUP, MD_ListView_OnGetFocusedGroup);
4955 #endif
4956             HANDLE_MSG(hwnd, LVM_GETCOLUMNW, MD_ListView_OnGetColumnW);
4957             HANDLE_MSG(hwnd, LVM_SETCOLUMNW, MD_ListView_OnSetColumnW);
4958             HANDLE_MSG(hwnd, LVM_INSERTCOLUMNW, MD_ListView_OnInsertColumnW);
4959 #if NTDDI_VERSION >= 0x06000000
4960             HANDLE_MSG(hwnd, LVM_GETGROUPRECT, MD_ListView_OnGetGroupRect);
4961 #endif
4962             HANDLE_MSG(hwnd, LVM_GETITEMTEXTW, MD_ListView_OnGetItemTextW);
4963             HANDLE_MSG(hwnd, LVM_SETITEMTEXTW, MD_ListView_OnSetItemTextW);
4964             HANDLE_MSG(hwnd, LVM_GETISEARCHSTRINGW, MD_ListView_OnGetISearchStringW);
4965             HANDLE_MSG(hwnd, LVM_EDITLABELW, MD_ListView_OnEditLabelW);
4966             HANDLE_MSG(hwnd, LVM_SETBKIMAGEW, MD_ListView_OnSetBkImageW);
4967             HANDLE_MSG(hwnd, LVM_GETBKIMAGEW, MD_ListView_OnGetBkImageW);
4968             HANDLE_MSG(hwnd, LVM_SETSELECTEDCOLUMN, MD_ListView_OnSetSelectedColumn);
4969             HANDLE_MSG(hwnd, LVM_SETTILEWIDTH, MD_ListView_OnSetTileWidth);
4970             HANDLE_MSG(hwnd, LVM_SETVIEW, MD_ListView_OnSetView);
4971             HANDLE_MSG(hwnd, LVM_GETVIEW, MD_ListView_OnGetView);
4972 #if NTDDI_VERSION >= 0x06000000
4973             HANDLE_MSG(hwnd, LVM_INSERTGROUP, MD_ListView_OnInsertGroup);
4974             HANDLE_MSG(hwnd, LVM_SETGROUPINFO, MD_ListView_OnSetGroupInfo);
4975             HANDLE_MSG(hwnd, LVM_GETGROUPINFO, MD_ListView_OnGetGroupInfo);
4976             HANDLE_MSG(hwnd, LVM_REMOVEGROUP, MD_ListView_OnRemoveGroup);
4977             HANDLE_MSG(hwnd, LVM_MOVEGROUP, MD_ListView_OnMoveGroup);
4978             HANDLE_MSG(hwnd, LVM_GETGROUPCOUNT, MD_ListView_OnGetGroupCount);
4979             HANDLE_MSG(hwnd, LVM_GETGROUPINFOBYINDEX, MD_ListView_OnGetGroupInfoByIndex);
4980             HANDLE_MSG(hwnd, LVM_MOVEITEMTOGROUP, MD_ListView_OnMoveItemToGroup);
4981             HANDLE_MSG(hwnd, LVM_SETGROUPMETRICS, MD_ListView_OnSetGroupMetrics);
4982             HANDLE_MSG(hwnd, LVM_GETGROUPMETRICS, MD_ListView_OnGetGroupMetrics);
4983             HANDLE_MSG(hwnd, LVM_ENABLEGROUPVIEW, MD_ListView_OnEnableGroupView);
4984             HANDLE_MSG(hwnd, LVM_SORTGROUPS, MD_ListView_OnSortGroups);
4985             HANDLE_MSG(hwnd, LVM_INSERTGROUPSORTED, MD_ListView_OnInsertGroupSorted);
4986             HANDLE_MSG(hwnd, LVM_REMOVEALLGROUPS, MD_ListView_OnRemoveAllGroups);
4987             HANDLE_MSG(hwnd, LVM_HASGROUP, MD_ListView_OnHasGroup);
4988 #endif
4989             HANDLE_MSG(hwnd, LVM_SETTILEVIEWINFO, MD_ListView_OnSetTileViewInfo);
4990             HANDLE_MSG(hwnd, LVM_GETTILEVIEWINFO, MD_ListView_OnGetTileViewInfo);
4991             HANDLE_MSG(hwnd, LVM_SETTILEINFO, MD_ListView_OnSetTileInfo);
4992             HANDLE_MSG(hwnd, LVM_GETTILEINFO, MD_ListView_OnGetTileInfo);
4993             HANDLE_MSG(hwnd, LVM_SETINSERTMARK, MD_ListView_OnSetInsertMark);
4994             HANDLE_MSG(hwnd, LVM_GETINSERTMARK, MD_ListView_OnGetInsertMark);
4995             HANDLE_MSG(hwnd, LVM_INSERTMARKHITTEST, MD_ListView_OnInsertMarkHitTest);
4996             HANDLE_MSG(hwnd, LVM_GETINSERTMARKRECT, MD_ListView_OnGetInsertMarkRect);
4997             HANDLE_MSG(hwnd, LVM_SETINSERTMARKCOLOR, MD_ListView_OnSetInsertMarkColor);
4998             HANDLE_MSG(hwnd, LVM_GETINSERTMARKCOLOR, MD_ListView_OnGetInsertMarkColor);
4999             HANDLE_MSG(hwnd, LVM_SETINFOTIP, MD_ListView_OnSetInfoTip);
5000             HANDLE_MSG(hwnd, LVM_GETSELECTEDCOLUMN, MD_ListView_OnGetSelectedColumn);
5001             HANDLE_MSG(hwnd, LVM_ISGROUPVIEWENABLED, MD_ListView_OnIsGroupViewEnabled);
5002             HANDLE_MSG(hwnd, LVM_GETOUTLINECOLOR, MD_ListView_OnGetOutlineColor);
5003             HANDLE_MSG(hwnd, LVM_SETOUTLINECOLOR, MD_ListView_OnSetOutlineColor);
5004             HANDLE_MSG(hwnd, LVM_CANCELEDITLABEL, MD_ListView_OnCancelEditLabel);
5005             HANDLE_MSG(hwnd, LVM_MAPINDEXTOID, MD_ListView_OnMapIndexToID);
5006             HANDLE_MSG(hwnd, LVM_MAPIDTOINDEX, MD_ListView_OnMapIDToIndex);
5007             HANDLE_MSG(hwnd, LVM_ISITEMVISIBLE, MD_ListView_OnIsItemVisible);
5008 #if NTDDI_VERSION >= 0x06000000
5009             HANDLE_MSG(hwnd, LVM_GETEMPTYTEXT, MD_ListView_OnGetEmptyText);
5010             HANDLE_MSG(hwnd, LVM_GETFOOTERRECT, MD_ListView_OnGetFooterRect);
5011             HANDLE_MSG(hwnd, LVM_GETFOOTERINFO, MD_ListView_OnGetFooterInfo);
5012             HANDLE_MSG(hwnd, LVM_GETFOOTERITEMRECT, MD_ListView_OnGetFooterItemRect);
5013             HANDLE_MSG(hwnd, LVM_GETFOOTERITEM, MD_ListView_OnGetFooterItem);
5014             HANDLE_MSG(hwnd, LVM_GETITEMINDEXRECT, MD_ListView_OnGetItemIndexRect);
5015             HANDLE_MSG(hwnd, LVM_SETITEMINDEXSTATE, MD_ListView_OnSetItemIndexState);
5016             HANDLE_MSG(hwnd, LVM_GETNEXTITEMINDEX, MD_ListView_OnGetNextItemIndex);
5017 #endif
5018         }
5019     }
5020     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_TREEVIEW) == 0)
5021     {
5022         switch (uMsg)
5023         {
5024             HANDLE_MSG(hwnd, TVM_INSERTITEMA, MD_TreeView_OnInsertItemA);
5025             HANDLE_MSG(hwnd, TVM_DELETEITEM, MD_TreeView_OnDeleteItem);
5026             HANDLE_MSG(hwnd, TVM_EXPAND, MD_TreeView_OnExpand);
5027             HANDLE_MSG(hwnd, TVM_GETITEMRECT, MD_TreeView_OnGetItemRect);
5028             HANDLE_MSG(hwnd, TVM_GETCOUNT, MD_TreeView_OnGetCount);
5029             HANDLE_MSG(hwnd, TVM_GETINDENT, MD_TreeView_OnGetIndent);
5030             HANDLE_MSG(hwnd, TVM_SETINDENT, MD_TreeView_OnSetIndent);
5031             HANDLE_MSG(hwnd, TVM_GETIMAGELIST, MD_TreeView_OnGetImageList);
5032             HANDLE_MSG(hwnd, TVM_SETIMAGELIST, MD_TreeView_OnSetImageList);
5033             HANDLE_MSG(hwnd, TVM_GETNEXTITEM, MD_TreeView_OnGetNextItem);
5034             HANDLE_MSG(hwnd, TVM_SELECTITEM, MD_TreeView_OnSelectItem);
5035             HANDLE_MSG(hwnd, TVM_GETITEMA, MD_TreeView_OnGetItemA);
5036             HANDLE_MSG(hwnd, TVM_SETITEMA, MD_TreeView_OnSetItemA);
5037             HANDLE_MSG(hwnd, TVM_EDITLABELA, MD_TreeView_OnEditLabelA);
5038             HANDLE_MSG(hwnd, TVM_GETEDITCONTROL, MD_TreeView_OnGetEditControl);
5039             HANDLE_MSG(hwnd, TVM_GETVISIBLECOUNT, MD_TreeView_OnGetVisibleCount);
5040             HANDLE_MSG(hwnd, TVM_HITTEST, MD_TreeView_OnHitTest);
5041             HANDLE_MSG(hwnd, TVM_CREATEDRAGIMAGE, MD_TreeView_OnCreateDragImage);
5042             HANDLE_MSG(hwnd, TVM_SORTCHILDREN, MD_TreeView_OnSortChildren);
5043             HANDLE_MSG(hwnd, TVM_ENSUREVISIBLE, MD_TreeView_OnEnsureVisible);
5044             HANDLE_MSG(hwnd, TVM_SORTCHILDRENCB, MD_TreeView_OnSortChildrenCB);
5045             HANDLE_MSG(hwnd, TVM_ENDEDITLABELNOW, MD_TreeView_OnEndEditLabelNow);
5046             HANDLE_MSG(hwnd, TVM_GETISEARCHSTRINGA, MD_TreeView_OnGetISearchStringA);
5047             HANDLE_MSG(hwnd, TVM_SETTOOLTIPS, MD_TreeView_OnSetToolTips);
5048             HANDLE_MSG(hwnd, TVM_GETTOOLTIPS, MD_TreeView_OnGetToolTips);
5049             HANDLE_MSG(hwnd, TVM_SETINSERTMARK, MD_TreeView_OnSetInsertMark);
5050             HANDLE_MSG(hwnd, TVM_SETITEMHEIGHT, MD_TreeView_OnSetItemHeight);
5051             HANDLE_MSG(hwnd, TVM_GETITEMHEIGHT, MD_TreeView_OnGetItemHeight);
5052             HANDLE_MSG(hwnd, TVM_SETBKCOLOR, MD_TreeView_OnSetBkColor);
5053             HANDLE_MSG(hwnd, TVM_SETTEXTCOLOR, MD_TreeView_OnSetTextColor);
5054             HANDLE_MSG(hwnd, TVM_GETBKCOLOR, MD_TreeView_OnGetBkColor);
5055             HANDLE_MSG(hwnd, TVM_GETTEXTCOLOR, MD_TreeView_OnGetTextColor);
5056             HANDLE_MSG(hwnd, TVM_SETSCROLLTIME, MD_TreeView_OnSetScrollTime);
5057             HANDLE_MSG(hwnd, TVM_GETSCROLLTIME, MD_TreeView_OnGetScrollTime);
5058 #if NTDDI_VERSION >= 0x06000000
5059             HANDLE_MSG(hwnd, TVM_SETBORDER, MD_TreeView_OnSetBorder);
5060 #endif
5061             HANDLE_MSG(hwnd, TVM_SETINSERTMARKCOLOR, MD_TreeView_OnSetInsertMarkColor);
5062             HANDLE_MSG(hwnd, TVM_GETINSERTMARKCOLOR, MD_TreeView_OnGetInsertMarkColor);
5063             HANDLE_MSG(hwnd, TVM_GETITEMSTATE, MD_TreeView_OnGetItemState);
5064             HANDLE_MSG(hwnd, TVM_SETLINECOLOR, MD_TreeView_OnSetLineColor);
5065             HANDLE_MSG(hwnd, TVM_GETLINECOLOR, MD_TreeView_OnGetLineColor);
5066             HANDLE_MSG(hwnd, TVM_MAPACCIDTOHTREEITEM, MD_TreeView_OnMapAccIDToHTREEITEM);
5067             HANDLE_MSG(hwnd, TVM_MAPHTREEITEMTOACCID, MD_TreeView_OnMapHTREEITEMToAccID);
5068 #if NTDDI_VERSION >= 0x06000000
5069             HANDLE_MSG(hwnd, TVM_SETEXTENDEDSTYLE, MD_TreeView_OnSetExtendedStyle);
5070             HANDLE_MSG(hwnd, TVM_GETEXTENDEDSTYLE, MD_TreeView_OnGetExtendedStyle);
5071 #endif
5072             HANDLE_MSG(hwnd, TVM_INSERTITEMW, MD_TreeView_OnInsertItemW);
5073 #if NTDDI_VERSION >= 0x06000000
5074             HANDLE_MSG(hwnd, TVM_SETHOT, MD_TreeView_OnSetHot);
5075             HANDLE_MSG(hwnd, TVM_SETAUTOSCROLLINFO, MD_TreeView_OnSetAutoScrollInfo);
5076 #endif
5077             HANDLE_MSG(hwnd, TVM_GETITEMW, MD_TreeView_OnGetItemW);
5078             HANDLE_MSG(hwnd, TVM_SETITEMW, MD_TreeView_OnSetItemW);
5079             HANDLE_MSG(hwnd, TVM_GETISEARCHSTRINGW, MD_TreeView_OnGetISearchStringW);
5080             HANDLE_MSG(hwnd, TVM_EDITLABELW, MD_TreeView_OnEditLabelW);
5081 #if NTDDI_VERSION >= 0x06000000
5082             HANDLE_MSG(hwnd, TVM_GETSELECTEDCOUNT, MD_TreeView_OnGetSelectedCount);
5083             HANDLE_MSG(hwnd, TVM_SHOWINFOTIP, MD_TreeView_OnShowInfoTip);
5084             HANDLE_MSG(hwnd, TVM_GETITEMPARTRECT, MD_TreeView_OnGetItemPartRect);
5085 #endif
5086         }
5087     }
5088 
5089     switch (uMsg)
5090     {
5091         HANDLE_MSG(hwnd, WM_NULL, MD_OnNull);
5092         HANDLE_MSG(hwnd, WM_CREATE, MD_OnCreate);
5093         HANDLE_MSG(hwnd, WM_DESTROY, MD_OnDestroy);
5094         HANDLE_MSG(hwnd, WM_MOVE, MD_OnMove);
5095         HANDLE_MSG(hwnd, WM_SIZE, MD_OnSize);
5096         HANDLE_MSG(hwnd, WM_ACTIVATE, MD_OnActivate);
5097         HANDLE_MSG(hwnd, WM_SETFOCUS, MD_OnSetFocus);
5098         HANDLE_MSG(hwnd, WM_KILLFOCUS, MD_OnKillFocus);
5099         HANDLE_MSG(hwnd, WM_ENABLE, MD_OnEnable);
5100         HANDLE_MSG(hwnd, WM_SETREDRAW, MD_OnSetRedraw);
5101         HANDLE_MSG(hwnd, WM_SETTEXT, MD_OnSetText);
5102         HANDLE_MSG(hwnd, WM_GETTEXT, MD_OnGetText);
5103         HANDLE_MSG(hwnd, WM_GETTEXTLENGTH, MD_OnGetTextLength);
5104         HANDLE_MSG(hwnd, WM_PAINT, MD_OnPaint);
5105         HANDLE_MSG(hwnd, WM_CLOSE, MD_OnClose);
5106 #ifndef _WIN32_WCE
5107         HANDLE_MSG(hwnd, WM_QUERYENDSESSION, MD_OnQueryEndSession);
5108         HANDLE_MSG(hwnd, WM_QUERYOPEN, MD_OnQueryOpen);
5109         HANDLE_MSG(hwnd, WM_ENDSESSION, MD_OnEndSession);
5110 #endif
5111         HANDLE_MSG(hwnd, WM_QUIT, MD_OnQuit);
5112         HANDLE_MSG(hwnd, WM_ERASEBKGND, MD_OnEraseBkgnd);
5113         HANDLE_MSG(hwnd, WM_SYSCOLORCHANGE, MD_OnSysColorChange);
5114         HANDLE_MSG(hwnd, WM_SHOWWINDOW, MD_OnShowWindow);
5115         /* HANDLE_MSG(hwnd, WM_WININICHANGE, MD_OnWinIniChange); */
5116         HANDLE_MSG(hwnd, WM_SETTINGCHANGE, MD_OnSettingChange);
5117         HANDLE_MSG(hwnd, WM_DEVMODECHANGE, MD_OnDevModeChange);
5118         HANDLE_MSG(hwnd, WM_ACTIVATEAPP, MD_OnActivateApp);
5119         HANDLE_MSG(hwnd, WM_FONTCHANGE, MD_OnFontChange);
5120         HANDLE_MSG(hwnd, WM_TIMECHANGE, MD_OnTimeChange);
5121         HANDLE_MSG(hwnd, WM_CANCELMODE, MD_OnCancelMode);
5122         HANDLE_MSG(hwnd, WM_SETCURSOR, MD_OnSetCursor);
5123         HANDLE_MSG(hwnd, WM_MOUSEACTIVATE, MD_OnMouseActivate);
5124         HANDLE_MSG(hwnd, WM_CHILDACTIVATE, MD_OnChildActivate);
5125         HANDLE_MSG(hwnd, WM_QUEUESYNC, MD_OnQueueSync);
5126         HANDLE_MSG(hwnd, WM_GETMINMAXINFO, MD_OnGetMinMaxInfo);
5127         HANDLE_MSG(hwnd, WM_PAINTICON, MD_OnPaintIcon);
5128         HANDLE_MSG(hwnd, WM_ICONERASEBKGND, MD_OnIconEraseBkgnd);
5129         HANDLE_MSG(hwnd, WM_NEXTDLGCTL, MD_OnNextDlgCtl);
5130         HANDLE_MSG(hwnd, WM_SPOOLERSTATUS, MD_OnSpoolerStatus);
5131         HANDLE_MSG(hwnd, WM_DRAWITEM, MD_OnDrawItem);
5132         HANDLE_MSG(hwnd, WM_MEASUREITEM, MD_OnMeasureItem);
5133         HANDLE_MSG(hwnd, WM_DELETEITEM, MD_OnDeleteItem);
5134         HANDLE_MSG(hwnd, WM_VKEYTOITEM, MD_OnVkeyToItem);
5135         HANDLE_MSG(hwnd, WM_CHARTOITEM, MD_OnCharToItem);
5136         HANDLE_MSG(hwnd, WM_SETFONT, MD_OnSetFont);
5137         HANDLE_MSG(hwnd, WM_GETFONT, MD_OnGetFont);
5138         HANDLE_MSG(hwnd, WM_SETHOTKEY, MD_OnSetHotKey);
5139         HANDLE_MSG(hwnd, WM_GETHOTKEY, MD_OnGetHotKey);
5140         HANDLE_MSG(hwnd, WM_QUERYDRAGICON, MD_OnQueryDragIcon);
5141         HANDLE_MSG(hwnd, WM_COMPAREITEM, MD_OnCompareItem);
5142 #if WINVER >= 0x0500
5143 # ifndef _WIN32_WCE
5144         HANDLE_MSG(hwnd, WM_GETOBJECT, MD_OnGetObject);
5145 # endif
5146 #endif
5147         HANDLE_MSG(hwnd, WM_COMPACTING, MD_OnCompacting);
5148         HANDLE_MSG(hwnd, WM_COMMNOTIFY, MD_OnCommNotify);
5149         HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGING, MD_OnWindowPosChanging);
5150         HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, MD_OnWindowPosChanged);
5151         HANDLE_MSG(hwnd, WM_POWER, MD_OnPower);
5152         HANDLE_MSG(hwnd, WM_COPYDATA, MD_OnCopyData);
5153         HANDLE_MSG(hwnd, WM_CANCELJOURNAL, MD_OnCancelJournal);
5154 #if WINVER >= 0x0400
5155         HANDLE_MSG(hwnd, WM_NOTIFY, MD_OnNotify);
5156         HANDLE_MSG(hwnd, WM_INPUTLANGCHANGEREQUEST, MD_OnInputLangChangeRequest);
5157         HANDLE_MSG(hwnd, WM_INPUTLANGCHANGE, MD_OnInputLangChange);
5158         HANDLE_MSG(hwnd, WM_TCARD, MD_OnTCard);
5159         HANDLE_MSG(hwnd, WM_HELP, MD_OnHelp);
5160         HANDLE_MSG(hwnd, WM_USERCHANGED, MD_OnUserChanged);
5161         HANDLE_MSG(hwnd, WM_NOTIFYFORMAT, MD_OnNotifyFormat);
5162         HANDLE_MSG(hwnd, WM_CONTEXTMENU, MD_OnContextMenu);
5163         HANDLE_MSG(hwnd, WM_STYLECHANGING, MD_OnStyleChanging);
5164         HANDLE_MSG(hwnd, WM_STYLECHANGED, MD_OnStyleChanged);
5165         HANDLE_MSG(hwnd, WM_DISPLAYCHANGE, MD_OnDisplayChange);
5166         HANDLE_MSG(hwnd, WM_GETICON, MD_OnGetIcon);
5167         HANDLE_MSG(hwnd, WM_SETICON, MD_OnSetIcon);
5168 #endif
5169         HANDLE_MSG(hwnd, WM_NCCREATE, MD_OnNCCreate);
5170         HANDLE_MSG(hwnd, WM_NCDESTROY, MD_OnNCDestroy);
5171         HANDLE_MSG(hwnd, WM_NCCALCSIZE, MD_OnNCCalcSize);
5172         HANDLE_MSG(hwnd, WM_NCHITTEST, MD_OnNCHitTest);
5173         HANDLE_MSG(hwnd, WM_NCPAINT, MD_OnNCPaint);
5174         HANDLE_MSG(hwnd, WM_NCACTIVATE, MD_OnNCActivate);
5175         HANDLE_MSG(hwnd, WM_GETDLGCODE, MD_OnGetDlgCode);
5176 #ifndef _WIN32_WCE
5177         HANDLE_MSG(hwnd, WM_SYNCPAINT, MD_OnSyncPaint);
5178 #endif
5179         HANDLE_MSG(hwnd, WM_NCMOUSEMOVE, MD_OnNCMouseMove);
5180         HANDLE_MSG(hwnd, WM_NCLBUTTONDOWN, MD_OnNCLButtonDown);
5181         HANDLE_MSG(hwnd, WM_NCLBUTTONUP, MD_OnNCLButtonUp);
5182         HANDLE_MSG(hwnd, WM_NCLBUTTONDBLCLK, MD_OnNCLButtonDown);
5183         HANDLE_MSG(hwnd, WM_NCRBUTTONDOWN, MD_OnNCRButtonDown);
5184         HANDLE_MSG(hwnd, WM_NCRBUTTONUP, MD_OnNCRButtonUp);
5185         HANDLE_MSG(hwnd, WM_NCRBUTTONDBLCLK, MD_OnNCRButtonDown);
5186         HANDLE_MSG(hwnd, WM_NCMBUTTONDOWN, MD_OnNCMButtonDown);
5187         HANDLE_MSG(hwnd, WM_NCMBUTTONUP, MD_OnNCMButtonUp);
5188         HANDLE_MSG(hwnd, WM_NCMBUTTONDBLCLK, MD_OnNCMButtonDown);
5189 #if _WIN32_WINNT >= 0x0500
5190         HANDLE_MSG(hwnd, WM_NCXBUTTONDOWN, MD_OnNCXButtonDown);
5191         HANDLE_MSG(hwnd, WM_NCXBUTTONUP, MD_OnNCXButtonUp);
5192         HANDLE_MSG(hwnd, WM_NCXBUTTONDBLCLK, MD_OnNCXButtonDown);
5193 #endif
5194         HANDLE_MSG(hwnd, WM_KEYDOWN, MD_OnKey);
5195         HANDLE_MSG(hwnd, WM_KEYUP, MD_OnKey);
5196         HANDLE_MSG(hwnd, WM_CHAR, MD_OnChar);
5197         HANDLE_MSG(hwnd, WM_DEADCHAR, MD_OnDeadChar);
5198         HANDLE_MSG(hwnd, WM_SYSKEYDOWN, MD_OnSysKey);
5199         HANDLE_MSG(hwnd, WM_SYSKEYUP, MD_OnSysKey);
5200         HANDLE_MSG(hwnd, WM_SYSCHAR, MD_OnSysChar);
5201         HANDLE_MSG(hwnd, WM_SYSDEADCHAR, MD_OnSysDeadChar);
5202 #if WINVER >= 0x0400
5203         HANDLE_MSG(hwnd, WM_IME_STARTCOMPOSITION, MD_OnImeStartComposition);
5204         HANDLE_MSG(hwnd, WM_IME_ENDCOMPOSITION, MD_OnImeEndComposition);
5205         HANDLE_MSG(hwnd, WM_IME_COMPOSITION, MD_OnImeComposition);
5206 #endif
5207         HANDLE_MSG(hwnd, WM_INITDIALOG, MD_OnInitDialog);
5208         HANDLE_MSG(hwnd, WM_COMMAND, MD_OnCommand);
5209         HANDLE_MSG(hwnd, WM_SYSCOMMAND, MD_OnSysCommand);
5210         HANDLE_MSG(hwnd, WM_TIMER, MD_OnTimer);
5211         HANDLE_MSG(hwnd, WM_HSCROLL, MD_OnHScroll);
5212         HANDLE_MSG(hwnd, WM_VSCROLL, MD_OnVScroll);
5213         HANDLE_MSG(hwnd, WM_INITMENU, MD_OnInitMenu);
5214         HANDLE_MSG(hwnd, WM_INITMENUPOPUP, MD_OnInitMenuPopup);
5215         HANDLE_MSG(hwnd, WM_MENUSELECT, MD_OnMenuSelect);
5216         HANDLE_MSG(hwnd, WM_MENUCHAR, MD_OnMenuChar);
5217         HANDLE_MSG(hwnd, WM_ENTERIDLE, MD_OnEnterIdle);
5218 #if WINVER >= 0x0500
5219 # ifndef _WIN32_WCE
5220         HANDLE_MSG(hwnd, WM_MENURBUTTONUP, MD_OnMenuRButtonUp);
5221         HANDLE_MSG(hwnd, WM_MENUDRAG, MD_OnMenuDrag);
5222         HANDLE_MSG(hwnd, WM_MENUGETOBJECT, MD_OnMenuGetObject);
5223         HANDLE_MSG(hwnd, WM_UNINITMENUPOPUP, MD_OnUninitMenuPopup);
5224         HANDLE_MSG(hwnd, WM_MENUCOMMAND, MD_OnMenuCommand);
5225 #  ifndef _WIN32_WCE
5226 #   if _WIN32_WINNT >= 0x0500
5227         HANDLE_MSG(hwnd, WM_CHANGEUISTATE, MD_OnChangeUIState);
5228         HANDLE_MSG(hwnd, WM_UPDATEUISTATE, MD_OnUpdateUIState);
5229         HANDLE_MSG(hwnd, WM_QUERYUISTATE, MD_OnQueryUIState);
5230 #   endif
5231 #  endif
5232 # endif
5233 #endif
5234         HANDLE_MSG(hwnd, WM_CTLCOLORMSGBOX, MD_OnCtlColor);
5235         HANDLE_MSG(hwnd, WM_CTLCOLOREDIT, MD_OnCtlColor);
5236         HANDLE_MSG(hwnd, WM_CTLCOLORLISTBOX, MD_OnCtlColor);
5237         HANDLE_MSG(hwnd, WM_CTLCOLORBTN, MD_OnCtlColor);
5238         HANDLE_MSG(hwnd, WM_CTLCOLORDLG, MD_OnCtlColor);
5239         HANDLE_MSG(hwnd, WM_CTLCOLORSCROLLBAR, MD_OnCtlColor);
5240         HANDLE_MSG(hwnd, WM_CTLCOLORSTATIC, MD_OnCtlColor);
5241         HANDLE_MSG(hwnd, WM_MOUSEMOVE, MD_OnMouseMove);
5242         HANDLE_MSG(hwnd, WM_LBUTTONDOWN, MD_OnLButtonDown);
5243         HANDLE_MSG(hwnd, WM_LBUTTONUP, MD_OnLButtonUp);
5244         HANDLE_MSG(hwnd, WM_LBUTTONDBLCLK, MD_OnLButtonDown);
5245         HANDLE_MSG(hwnd, WM_RBUTTONDOWN, MD_OnRButtonDown);
5246         HANDLE_MSG(hwnd, WM_RBUTTONUP, MD_OnRButtonUp);
5247         HANDLE_MSG(hwnd, WM_RBUTTONDBLCLK, MD_OnRButtonDown);
5248         HANDLE_MSG(hwnd, WM_MBUTTONDOWN, MD_OnMButtonDown);
5249         HANDLE_MSG(hwnd, WM_MBUTTONUP, MD_OnMButtonUp);
5250         HANDLE_MSG(hwnd, WM_MBUTTONDBLCLK, MD_OnMButtonDown);
5251 #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
5252         HANDLE_MSG(hwnd, WM_MOUSEWHEEL, MD_OnMouseWheel);
5253 #endif
5254 #if _WIN32_WINNT >= 0x0500
5255         HANDLE_MSG(hwnd, WM_XBUTTONDOWN, MD_OnXButtonDown);
5256         HANDLE_MSG(hwnd, WM_XBUTTONUP, MD_OnXButtonUp);
5257         HANDLE_MSG(hwnd, WM_XBUTTONDBLCLK, MD_OnXButtonDown);
5258 #endif
5259         HANDLE_MSG(hwnd, WM_PARENTNOTIFY, MD_OnParentNotify);
5260         HANDLE_MSG(hwnd, WM_ENTERMENULOOP, MD_OnEnterMenuLoop);
5261         HANDLE_MSG(hwnd, WM_EXITMENULOOP, MD_OnExitMenuLoop);
5262 #if WINVER >= 0x0400
5263         HANDLE_MSG(hwnd, WM_NEXTMENU, MD_OnNextMenu);
5264         HANDLE_MSG(hwnd, WM_SIZING, MD_OnSizing);
5265         HANDLE_MSG(hwnd, WM_CAPTURECHANGED, MD_OnCaptureChanged);
5266         HANDLE_MSG(hwnd, WM_MOVING, MD_OnMoving);
5267         HANDLE_MSG(hwnd, WM_POWERBROADCAST, MD_OnPowerBroadcast);
5268         HANDLE_MSG(hwnd, WM_DEVICECHANGE, MD_OnDeviceChange);
5269 #endif
5270         HANDLE_MSG(hwnd, WM_MDICREATE, MD_MDICreate);
5271         HANDLE_MSG(hwnd, WM_MDIDESTROY, MD_MDIDestroy);
5272         HANDLE_MSG(hwnd, WM_MDIACTIVATE, MD_MDIActivate);
5273         HANDLE_MSG(hwnd, WM_MDIRESTORE, MD_MDIRestore);
5274         HANDLE_MSG(hwnd, WM_MDINEXT, MD_MDINext);
5275         HANDLE_MSG(hwnd, WM_MDIMAXIMIZE, MD_MDIMaximize);
5276         HANDLE_MSG(hwnd, WM_MDITILE, MD_MDITile);
5277         HANDLE_MSG(hwnd, WM_MDICASCADE, MD_MDICascade);
5278         HANDLE_MSG(hwnd, WM_MDIICONARRANGE, MD_MDIIconArrange);
5279         HANDLE_MSG(hwnd, WM_MDIGETACTIVE, MD_MDIGetActive);
5280 #ifdef _UNDOCUSER_H
5281         HANDLE_MSG(hwnd, WM_DROPOBJECT, MD_OnDropObject);
5282         HANDLE_MSG(hwnd, WM_QUERYDROPOBJECT, MD_OnQueryDropObject);
5283         HANDLE_MSG(hwnd, WM_BEGINDRAG, MD_OnBeginDrag);
5284         HANDLE_MSG(hwnd, WM_DRAGLOOP, MD_OnDragLoop);
5285         HANDLE_MSG(hwnd, WM_DRAGSELECT, MD_OnDragSelect);
5286         HANDLE_MSG(hwnd, WM_DRAGMOVE, MD_OnDragMove);
5287 #endif
5288         HANDLE_MSG(hwnd, WM_MDISETMENU, MD_MDISetMenu);
5289         HANDLE_MSG(hwnd, WM_ENTERSIZEMOVE, MD_OnEnterSizeMove);
5290         HANDLE_MSG(hwnd, WM_EXITSIZEMOVE, MD_OnExitSizeMove);
5291         HANDLE_MSG(hwnd, WM_DROPFILES, MD_OnDropFiles);
5292         HANDLE_MSG(hwnd, WM_MDIREFRESHMENU, MD_MDIRefreshMenu);
5293 #if WINVER >= 0x0400
5294         HANDLE_MSG(hwnd, WM_IME_SETCONTEXT, MD_OnImeSetContext);
5295         HANDLE_MSG(hwnd, WM_IME_NOTIFY, MD_OnImeNotify);
5296         HANDLE_MSG(hwnd, WM_IME_CONTROL, MD_OnImeControl);
5297         HANDLE_MSG(hwnd, WM_IME_COMPOSITIONFULL, MD_OnImeCompositionFull);
5298         HANDLE_MSG(hwnd, WM_IME_SELECT, MD_OnImeSelect);
5299         HANDLE_MSG(hwnd, WM_IME_CHAR, MD_OnImeChar);
5300 #endif
5301 #if WINVER >= 0x0500
5302         HANDLE_MSG(hwnd, WM_IME_REQUEST, MD_OnImeRequest);
5303 #endif
5304 #if WINVER >= 0x0400
5305         HANDLE_MSG(hwnd, WM_IME_KEYDOWN, MD_OnImeKey);
5306         HANDLE_MSG(hwnd, WM_IME_KEYUP, MD_OnImeKey);
5307 #endif
5308 #if (_WIN32_WINNT >= 0x0400) || (WINVER >= 0x0500)
5309         HANDLE_MSG(hwnd, WM_MOUSEHOVER, MD_OnMouseHover);
5310         HANDLE_MSG(hwnd, WM_MOUSELEAVE, MD_OnMouseLeave);
5311 #endif
5312 #if WINVER >= 0x0500
5313         HANDLE_MSG(hwnd, WM_NCMOUSEHOVER, MD_OnNCMouseHover);
5314         HANDLE_MSG(hwnd, WM_NCMOUSELEAVE, MD_OnNCMouseLeave);
5315 #endif
5316         HANDLE_MSG(hwnd, WM_CUT, MD_OnCut);
5317         HANDLE_MSG(hwnd, WM_COPY, MD_OnCopy);
5318         HANDLE_MSG(hwnd, WM_PASTE, MD_OnPaste);
5319         HANDLE_MSG(hwnd, WM_CLEAR, MD_OnClear);
5320         HANDLE_MSG(hwnd, WM_UNDO, MD_OnUndo);
5321         HANDLE_MSG(hwnd, WM_RENDERFORMAT, MD_OnRenderFormat);
5322         HANDLE_MSG(hwnd, WM_RENDERALLFORMATS, MD_OnRenderAllFormats);
5323         HANDLE_MSG(hwnd, WM_DESTROYCLIPBOARD, MD_OnDestroyClipboard);
5324         HANDLE_MSG(hwnd, WM_DRAWCLIPBOARD, MD_OnDrawClipboard);
5325         HANDLE_MSG(hwnd, WM_PAINTCLIPBOARD, MD_OnPaintClipboard);
5326         HANDLE_MSG(hwnd, WM_VSCROLLCLIPBOARD, MD_OnVScrollClipboard);
5327         HANDLE_MSG(hwnd, WM_SIZECLIPBOARD, MD_OnSizeClipboard);
5328         HANDLE_MSG(hwnd, WM_ASKCBFORMATNAME, MD_OnAskCBFormatName);
5329         HANDLE_MSG(hwnd, WM_CHANGECBCHAIN, MD_OnChangeCBChain);
5330         HANDLE_MSG(hwnd, WM_HSCROLLCLIPBOARD, MD_OnHScrollClipboard);
5331         HANDLE_MSG(hwnd, WM_QUERYNEWPALETTE, MD_OnQueryNewPalette);
5332         HANDLE_MSG(hwnd, WM_PALETTEISCHANGING, MD_OnPaletteIsChanging);
5333         HANDLE_MSG(hwnd, WM_PALETTECHANGED, MD_OnPaletteChanged);
5334         HANDLE_MSG(hwnd, WM_HOTKEY, MD_OnHotKey);
5335 #if WINVER >= 0x0400
5336         HANDLE_MSG(hwnd, WM_PRINT, MD_OnPrint);
5337         HANDLE_MSG(hwnd, WM_PRINTCLIENT, MD_OnPrintClient);
5338 #endif
5339 #if _WIN32_WINNT >= 0x0500
5340         HANDLE_MSG(hwnd, WM_APPCOMMAND, MD_OnAppCommand);
5341 #endif
5342         default:
5343         {
5344             if (WM_USER <= uMsg && uMsg < WM_APP)
5345             {
5346                 return MD_OnUser(hwnd, uMsg, wParam, lParam);
5347             }
5348             if (WM_APP <= uMsg && uMsg < MAXINTATOM)
5349             {
5350                 return MD_OnApp(hwnd, uMsg, wParam, lParam);
5351             }
5352             else if (MAXINTATOM <= uMsg && uMsg <= MAXWORD &&
5353                      GetClipboardFormatName(uMsg, szMsg, _countof(szMsg)))
5354             {
5355                 MSGDUMP_TPRINTF(TEXT("%sWM_%u[\"%s\"](hwnd:%p, wParam:%p, lParam:%p)\n"),
5356                                 MSGDUMP_PREFIX, uMsg, szMsg, (void *)hwnd, wParam, lParam);
5357             }
5358             else
5359             {
5360                 return MD_OnUnknown(hwnd, uMsg, wParam, lParam);
5361             }
5362         }
5363     }
5364     return 0;
5365 }
5366 
5367 static __inline LRESULT MSGDUMP_API
5368 MD_msgresult(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT lResult)
5369 {
5370 #define DEFINE_RESULT(WM_) case WM_: MSGDUMP_TPRINTF(TEXT("%s") TEXT(#WM_) TEXT(": hwnd:%p, lResult:%p\n"), \
5371                                                      MSGDUMP_PREFIX, (void *)hwnd, lResult); break
5372     TCHAR szClass[24], sz[2], szMsg[64];
5373     szClass[0] = 0;
5374     GetClassName(hwnd, szClass, ARRAYSIZE(szClass));
5375     sz[0] = szClass[0];
5376     sz[1] = 0;
5377     CharUpper(sz);
5378 
5379     if (sz[0] == TEXT('R') && lstrcmpi(szClass, RICHEDIT_CLASS) == 0)
5380     {
5381         switch (uMsg)
5382         {
5383             DEFINE_RESULT(EM_CANPASTE);
5384             DEFINE_RESULT(EM_DISPLAYBAND);
5385             DEFINE_RESULT(EM_EXGETSEL);
5386             DEFINE_RESULT(EM_EXLIMITTEXT);
5387             DEFINE_RESULT(EM_EXLINEFROMCHAR);
5388             DEFINE_RESULT(EM_EXSETSEL);
5389             DEFINE_RESULT(EM_FINDTEXT);
5390             DEFINE_RESULT(EM_FORMATRANGE);
5391             DEFINE_RESULT(EM_GETCHARFORMAT);
5392             DEFINE_RESULT(EM_GETEVENTMASK);
5393             DEFINE_RESULT(EM_GETOLEINTERFACE);
5394             DEFINE_RESULT(EM_GETPARAFORMAT);
5395             DEFINE_RESULT(EM_GETSELTEXT);
5396             DEFINE_RESULT(EM_HIDESELECTION);
5397             DEFINE_RESULT(EM_PASTESPECIAL);
5398             DEFINE_RESULT(EM_REQUESTRESIZE);
5399             DEFINE_RESULT(EM_SELECTIONTYPE);
5400             DEFINE_RESULT(EM_SETBKGNDCOLOR);
5401             DEFINE_RESULT(EM_SETCHARFORMAT);
5402             DEFINE_RESULT(EM_SETEVENTMASK);
5403             DEFINE_RESULT(EM_SETOLECALLBACK);
5404             DEFINE_RESULT(EM_SETPARAFORMAT);
5405             DEFINE_RESULT(EM_SETTARGETDEVICE);
5406             DEFINE_RESULT(EM_STREAMIN);
5407             DEFINE_RESULT(EM_STREAMOUT);
5408             DEFINE_RESULT(EM_GETTEXTRANGE);
5409             DEFINE_RESULT(EM_FINDWORDBREAK);
5410             DEFINE_RESULT(EM_SETOPTIONS);
5411             DEFINE_RESULT(EM_GETOPTIONS);
5412             DEFINE_RESULT(EM_FINDTEXTEX);
5413             DEFINE_RESULT(EM_GETWORDBREAKPROCEX);
5414             DEFINE_RESULT(EM_SETWORDBREAKPROCEX);
5415             DEFINE_RESULT(EM_SETUNDOLIMIT);
5416             DEFINE_RESULT(EM_REDO);
5417             DEFINE_RESULT(EM_CANREDO);
5418             DEFINE_RESULT(EM_GETUNDONAME);
5419             DEFINE_RESULT(EM_GETREDONAME);
5420             DEFINE_RESULT(EM_STOPGROUPTYPING);
5421             DEFINE_RESULT(EM_SETTEXTMODE);
5422             DEFINE_RESULT(EM_GETTEXTMODE);
5423         }
5424     }
5425 
5426     if ((sz[0] == TEXT('E') && lstrcmpi(szClass, TEXT("EDIT")) == 0) ||
5427         (sz[0] == TEXT('R') && lstrcmpi(szClass, RICHEDIT_CLASS) == 0))
5428     {
5429         switch (uMsg)
5430         {
5431             DEFINE_RESULT(EM_GETSEL);
5432             DEFINE_RESULT(EM_SETSEL);
5433             DEFINE_RESULT(EM_GETRECT);
5434             DEFINE_RESULT(EM_SETRECT);
5435             DEFINE_RESULT(EM_SETRECTNP);
5436             DEFINE_RESULT(EM_SCROLL);
5437             DEFINE_RESULT(EM_LINESCROLL);
5438             DEFINE_RESULT(EM_SCROLLCARET );
5439             DEFINE_RESULT(EM_GETMODIFY);
5440             DEFINE_RESULT(EM_SETMODIFY);
5441             DEFINE_RESULT(EM_GETLINECOUNT);
5442             DEFINE_RESULT(EM_LINEINDEX);
5443             DEFINE_RESULT(EM_SETHANDLE);
5444             DEFINE_RESULT(EM_GETHANDLE);
5445             DEFINE_RESULT(EM_GETTHUMB);
5446             DEFINE_RESULT(EM_LINELENGTH);
5447             DEFINE_RESULT(EM_REPLACESEL);
5448             DEFINE_RESULT(EM_GETLINE);
5449             DEFINE_RESULT(EM_CANUNDO);
5450             DEFINE_RESULT(EM_UNDO);
5451             DEFINE_RESULT(EM_FMTLINES);
5452             DEFINE_RESULT(EM_LINEFROMCHAR);
5453             DEFINE_RESULT(EM_SETTABSTOPS);
5454             DEFINE_RESULT(EM_SETPASSWORDCHAR);
5455             DEFINE_RESULT(EM_EMPTYUNDOBUFFER);
5456             DEFINE_RESULT(EM_GETFIRSTVISIBLELINE);
5457             DEFINE_RESULT(EM_SETREADONLY);
5458             DEFINE_RESULT(EM_SETWORDBREAKPROC);
5459             DEFINE_RESULT(EM_GETWORDBREAKPROC);
5460             DEFINE_RESULT(EM_GETPASSWORDCHAR);
5461             DEFINE_RESULT(EM_SETMARGINS);
5462             DEFINE_RESULT(EM_GETMARGINS);
5463             DEFINE_RESULT(EM_SETLIMITTEXT);
5464             DEFINE_RESULT(EM_GETLIMITTEXT);
5465             DEFINE_RESULT(EM_POSFROMCHAR);
5466             DEFINE_RESULT(EM_CHARFROMPOS);
5467             DEFINE_RESULT(EM_SETIMESTATUS);
5468             DEFINE_RESULT(EM_GETIMESTATUS);
5469         }
5470     }
5471     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, TEXT("STATIC")) == 0)
5472     {
5473         switch (uMsg)
5474         {
5475             DEFINE_RESULT(STM_SETICON);
5476             DEFINE_RESULT(STM_GETICON);
5477             DEFINE_RESULT(STM_SETIMAGE);
5478             DEFINE_RESULT(STM_GETIMAGE);
5479         }
5480     }
5481     else if (sz[0] == TEXT('L') && lstrcmpi(szClass, TEXT("LISTBOX")) == 0)
5482     {
5483         switch (uMsg)
5484         {
5485             DEFINE_RESULT(LB_ADDSTRING);
5486             DEFINE_RESULT(LB_INSERTSTRING);
5487             DEFINE_RESULT(LB_DELETESTRING);
5488             DEFINE_RESULT(LB_SELITEMRANGEEX);
5489             DEFINE_RESULT(LB_RESETCONTENT);
5490             DEFINE_RESULT(LB_SETSEL);
5491             DEFINE_RESULT(LB_SETCURSEL);
5492             DEFINE_RESULT(LB_GETSEL);
5493             DEFINE_RESULT(LB_GETCURSEL);
5494             DEFINE_RESULT(LB_GETTEXT);
5495             DEFINE_RESULT(LB_GETTEXTLEN);
5496             DEFINE_RESULT(LB_GETCOUNT);
5497             DEFINE_RESULT(LB_SELECTSTRING);
5498             DEFINE_RESULT(LB_DIR);
5499             DEFINE_RESULT(LB_GETTOPINDEX);
5500             DEFINE_RESULT(LB_FINDSTRING);
5501             DEFINE_RESULT(LB_GETSELCOUNT);
5502             DEFINE_RESULT(LB_GETSELITEMS);
5503             DEFINE_RESULT(LB_SETTABSTOPS);
5504             DEFINE_RESULT(LB_GETHORIZONTALEXTENT);
5505             DEFINE_RESULT(LB_SETHORIZONTALEXTENT);
5506             DEFINE_RESULT(LB_SETCOLUMNWIDTH);
5507             DEFINE_RESULT(LB_ADDFILE);
5508             DEFINE_RESULT(LB_SETTOPINDEX);
5509             DEFINE_RESULT(LB_GETITEMRECT);
5510             DEFINE_RESULT(LB_GETITEMDATA);
5511             DEFINE_RESULT(LB_SETITEMDATA);
5512             DEFINE_RESULT(LB_SELITEMRANGE);
5513             DEFINE_RESULT(LB_SETANCHORINDEX);
5514             DEFINE_RESULT(LB_GETANCHORINDEX);
5515             DEFINE_RESULT(LB_SETCARETINDEX);
5516             DEFINE_RESULT(LB_GETCARETINDEX);
5517             DEFINE_RESULT(LB_SETITEMHEIGHT);
5518             DEFINE_RESULT(LB_GETITEMHEIGHT);
5519             DEFINE_RESULT(LB_FINDSTRINGEXACT);
5520             DEFINE_RESULT(LB_SETLOCALE);
5521             DEFINE_RESULT(LB_GETLOCALE);
5522             DEFINE_RESULT(LB_SETCOUNT);
5523             DEFINE_RESULT(LB_INITSTORAGE);
5524             DEFINE_RESULT(LB_ITEMFROMPOINT);
5525         }
5526     }
5527     else if (sz[0] == TEXT('C') && lstrcmpi(szClass, TEXT("COMBOBOX")) == 0)
5528     {
5529         switch (uMsg)
5530         {
5531             DEFINE_RESULT(CB_GETEDITSEL);
5532             DEFINE_RESULT(CB_LIMITTEXT);
5533             DEFINE_RESULT(CB_SETEDITSEL);
5534             DEFINE_RESULT(CB_ADDSTRING);
5535             DEFINE_RESULT(CB_DELETESTRING);
5536             DEFINE_RESULT(CB_DIR);
5537             DEFINE_RESULT(CB_GETCOUNT);
5538             DEFINE_RESULT(CB_GETCURSEL);
5539             DEFINE_RESULT(CB_GETLBTEXT);
5540             DEFINE_RESULT(CB_GETLBTEXTLEN);
5541             DEFINE_RESULT(CB_INSERTSTRING);
5542             DEFINE_RESULT(CB_RESETCONTENT);
5543             DEFINE_RESULT(CB_FINDSTRING);
5544             DEFINE_RESULT(CB_SELECTSTRING);
5545             DEFINE_RESULT(CB_SETCURSEL);
5546             DEFINE_RESULT(CB_SHOWDROPDOWN);
5547             DEFINE_RESULT(CB_GETITEMDATA);
5548             DEFINE_RESULT(CB_SETITEMDATA);
5549             DEFINE_RESULT(CB_GETDROPPEDCONTROLRECT);
5550             DEFINE_RESULT(CB_SETITEMHEIGHT);
5551             DEFINE_RESULT(CB_GETITEMHEIGHT);
5552             DEFINE_RESULT(CB_SETEXTENDEDUI);
5553             DEFINE_RESULT(CB_GETEXTENDEDUI);
5554             DEFINE_RESULT(CB_GETDROPPEDSTATE);
5555             DEFINE_RESULT(CB_FINDSTRINGEXACT);
5556             DEFINE_RESULT(CB_SETLOCALE);
5557             DEFINE_RESULT(CB_GETLOCALE);
5558             DEFINE_RESULT(CB_GETTOPINDEX);
5559             DEFINE_RESULT(CB_SETTOPINDEX);
5560             DEFINE_RESULT(CB_GETHORIZONTALEXTENT);
5561             DEFINE_RESULT(CB_SETHORIZONTALEXTENT);
5562             DEFINE_RESULT(CB_GETDROPPEDWIDTH);
5563             DEFINE_RESULT(CB_SETDROPPEDWIDTH);
5564             DEFINE_RESULT(CB_INITSTORAGE);
5565         }
5566     }
5567     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, TEXT("SCROLLBAR")) == 0)
5568     {
5569         switch (uMsg)
5570         {
5571             DEFINE_RESULT(SBM_SETPOS);
5572             DEFINE_RESULT(SBM_GETPOS);
5573             DEFINE_RESULT(SBM_SETRANGE);
5574             DEFINE_RESULT(SBM_SETRANGEREDRAW);
5575             DEFINE_RESULT(SBM_GETRANGE);
5576             DEFINE_RESULT(SBM_ENABLE_ARROWS);
5577             DEFINE_RESULT(SBM_SETSCROLLINFO);
5578             DEFINE_RESULT(SBM_GETSCROLLINFO);
5579             DEFINE_RESULT(SBM_GETSCROLLBARINFO);
5580         }
5581     }
5582     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_LISTVIEW) == 0)
5583     {
5584         switch (uMsg)
5585         {
5586             DEFINE_RESULT(LVM_GETBKCOLOR);
5587             DEFINE_RESULT(LVM_SETBKCOLOR);
5588             DEFINE_RESULT(LVM_GETIMAGELIST);
5589             DEFINE_RESULT(LVM_SETIMAGELIST);
5590             DEFINE_RESULT(LVM_GETITEMCOUNT);
5591             DEFINE_RESULT(LVM_GETITEMA);
5592             DEFINE_RESULT(LVM_SETITEMA);
5593             DEFINE_RESULT(LVM_INSERTITEMA);
5594             DEFINE_RESULT(LVM_DELETEITEM);
5595             DEFINE_RESULT(LVM_DELETEALLITEMS);
5596             DEFINE_RESULT(LVM_GETCALLBACKMASK);
5597             DEFINE_RESULT(LVM_SETCALLBACKMASK);
5598             DEFINE_RESULT(LVM_GETNEXTITEM);
5599             DEFINE_RESULT(LVM_FINDITEMA);
5600             DEFINE_RESULT(LVM_GETITEMRECT);
5601             DEFINE_RESULT(LVM_SETITEMPOSITION);
5602             DEFINE_RESULT(LVM_GETITEMPOSITION);
5603             DEFINE_RESULT(LVM_GETSTRINGWIDTHA);
5604             DEFINE_RESULT(LVM_HITTEST);
5605             DEFINE_RESULT(LVM_ENSUREVISIBLE);
5606             DEFINE_RESULT(LVM_SCROLL);
5607             DEFINE_RESULT(LVM_REDRAWITEMS);
5608             DEFINE_RESULT(LVM_ARRANGE);
5609             DEFINE_RESULT(LVM_EDITLABELA);
5610             DEFINE_RESULT(LVM_GETEDITCONTROL);
5611             DEFINE_RESULT(LVM_GETCOLUMNA);
5612             DEFINE_RESULT(LVM_SETCOLUMNA);
5613             DEFINE_RESULT(LVM_INSERTCOLUMNA);
5614             DEFINE_RESULT(LVM_DELETECOLUMN);
5615             DEFINE_RESULT(LVM_GETCOLUMNWIDTH);
5616             DEFINE_RESULT(LVM_SETCOLUMNWIDTH);
5617             DEFINE_RESULT(LVM_GETHEADER);
5618             DEFINE_RESULT(LVM_CREATEDRAGIMAGE);
5619             DEFINE_RESULT(LVM_GETVIEWRECT);
5620             DEFINE_RESULT(LVM_GETTEXTCOLOR);
5621             DEFINE_RESULT(LVM_SETTEXTCOLOR);
5622             DEFINE_RESULT(LVM_GETTEXTBKCOLOR);
5623             DEFINE_RESULT(LVM_SETTEXTBKCOLOR);
5624             DEFINE_RESULT(LVM_GETTOPINDEX);
5625             DEFINE_RESULT(LVM_GETCOUNTPERPAGE);
5626             DEFINE_RESULT(LVM_GETORIGIN);
5627             DEFINE_RESULT(LVM_UPDATE);
5628             DEFINE_RESULT(LVM_SETITEMSTATE);
5629             DEFINE_RESULT(LVM_GETITEMSTATE);
5630             DEFINE_RESULT(LVM_GETITEMTEXTA);
5631             DEFINE_RESULT(LVM_SETITEMTEXTA);
5632             DEFINE_RESULT(LVM_SETITEMCOUNT);
5633             DEFINE_RESULT(LVM_SORTITEMS);
5634             DEFINE_RESULT(LVM_SETITEMPOSITION32);
5635             DEFINE_RESULT(LVM_GETSELECTEDCOUNT);
5636             DEFINE_RESULT(LVM_GETITEMSPACING);
5637             DEFINE_RESULT(LVM_GETISEARCHSTRINGA);
5638             DEFINE_RESULT(LVM_SETICONSPACING);
5639             DEFINE_RESULT(LVM_SETEXTENDEDLISTVIEWSTYLE);
5640             DEFINE_RESULT(LVM_GETEXTENDEDLISTVIEWSTYLE);
5641             DEFINE_RESULT(LVM_GETSUBITEMRECT);
5642             DEFINE_RESULT(LVM_SUBITEMHITTEST);
5643             DEFINE_RESULT(LVM_SETCOLUMNORDERARRAY);
5644             DEFINE_RESULT(LVM_GETCOLUMNORDERARRAY);
5645             DEFINE_RESULT(LVM_SETHOTITEM);
5646             DEFINE_RESULT(LVM_GETHOTITEM);
5647             DEFINE_RESULT(LVM_SETHOTCURSOR);
5648             DEFINE_RESULT(LVM_GETHOTCURSOR);
5649             DEFINE_RESULT(LVM_APPROXIMATEVIEWRECT);
5650             DEFINE_RESULT(LVM_SETWORKAREAS);
5651             DEFINE_RESULT(LVM_GETSELECTIONMARK);
5652             DEFINE_RESULT(LVM_SETSELECTIONMARK);
5653             DEFINE_RESULT(LVM_SETBKIMAGEA);
5654             DEFINE_RESULT(LVM_GETBKIMAGEA);
5655             DEFINE_RESULT(LVM_GETWORKAREAS);
5656             DEFINE_RESULT(LVM_SETHOVERTIME);
5657             DEFINE_RESULT(LVM_GETHOVERTIME);
5658             DEFINE_RESULT(LVM_GETNUMBEROFWORKAREAS);
5659             DEFINE_RESULT(LVM_SETTOOLTIPS);
5660             DEFINE_RESULT(LVM_GETITEMW);
5661             DEFINE_RESULT(LVM_SETITEMW);
5662             DEFINE_RESULT(LVM_INSERTITEMW);
5663             DEFINE_RESULT(LVM_GETTOOLTIPS);
5664             DEFINE_RESULT(LVM_SORTITEMSEX);
5665             DEFINE_RESULT(LVM_FINDITEMW);
5666             DEFINE_RESULT(LVM_GETSTRINGWIDTHW);
5667 #if NTDDI_VERSION >= 0x06000000
5668             DEFINE_RESULT(LVM_GETGROUPSTATE);
5669             DEFINE_RESULT(LVM_GETFOCUSEDGROUP);
5670 #endif
5671             DEFINE_RESULT(LVM_GETCOLUMNW);
5672             DEFINE_RESULT(LVM_SETCOLUMNW);
5673             DEFINE_RESULT(LVM_INSERTCOLUMNW);
5674 #if NTDDI_VERSION >= 0x06000000
5675             DEFINE_RESULT(LVM_GETGROUPRECT);
5676 #endif
5677             DEFINE_RESULT(LVM_GETITEMTEXTW);
5678             DEFINE_RESULT(LVM_SETITEMTEXTW);
5679             DEFINE_RESULT(LVM_GETISEARCHSTRINGW);
5680             DEFINE_RESULT(LVM_EDITLABELW);
5681             DEFINE_RESULT(LVM_SETBKIMAGEW);
5682             DEFINE_RESULT(LVM_GETBKIMAGEW);
5683             DEFINE_RESULT(LVM_SETSELECTEDCOLUMN);
5684             DEFINE_RESULT(LVM_SETTILEWIDTH);
5685             DEFINE_RESULT(LVM_SETVIEW);
5686             DEFINE_RESULT(LVM_GETVIEW);
5687 #if NTDDI_VERSION >= 0x06000000
5688             DEFINE_RESULT(LVM_INSERTGROUP);
5689             DEFINE_RESULT(LVM_SETGROUPINFO);
5690             DEFINE_RESULT(LVM_GETGROUPINFO);
5691             DEFINE_RESULT(LVM_REMOVEGROUP);
5692             DEFINE_RESULT(LVM_MOVEGROUP);
5693             DEFINE_RESULT(LVM_GETGROUPCOUNT);
5694             DEFINE_RESULT(LVM_GETGROUPINFOBYINDEX);
5695             DEFINE_RESULT(LVM_MOVEITEMTOGROUP);
5696             DEFINE_RESULT(LVM_SETGROUPMETRICS);
5697             DEFINE_RESULT(LVM_GETGROUPMETRICS);
5698             DEFINE_RESULT(LVM_ENABLEGROUPVIEW);
5699             DEFINE_RESULT(LVM_SORTGROUPS);
5700             DEFINE_RESULT(LVM_INSERTGROUPSORTED);
5701             DEFINE_RESULT(LVM_REMOVEALLGROUPS);
5702             DEFINE_RESULT(LVM_HASGROUP);
5703 #endif
5704             DEFINE_RESULT(LVM_SETTILEVIEWINFO);
5705             DEFINE_RESULT(LVM_GETTILEVIEWINFO);
5706             DEFINE_RESULT(LVM_SETTILEINFO);
5707             DEFINE_RESULT(LVM_GETTILEINFO);
5708             DEFINE_RESULT(LVM_SETINSERTMARK);
5709             DEFINE_RESULT(LVM_GETINSERTMARK);
5710             DEFINE_RESULT(LVM_INSERTMARKHITTEST);
5711             DEFINE_RESULT(LVM_GETINSERTMARKRECT);
5712             DEFINE_RESULT(LVM_SETINSERTMARKCOLOR);
5713             DEFINE_RESULT(LVM_GETINSERTMARKCOLOR);
5714             DEFINE_RESULT(LVM_SETINFOTIP);
5715             DEFINE_RESULT(LVM_GETSELECTEDCOLUMN);
5716             DEFINE_RESULT(LVM_ISGROUPVIEWENABLED);
5717             DEFINE_RESULT(LVM_GETOUTLINECOLOR);
5718             DEFINE_RESULT(LVM_SETOUTLINECOLOR);
5719             DEFINE_RESULT(LVM_CANCELEDITLABEL);
5720             DEFINE_RESULT(LVM_MAPINDEXTOID);
5721             DEFINE_RESULT(LVM_MAPIDTOINDEX);
5722             DEFINE_RESULT(LVM_ISITEMVISIBLE);
5723 #if NTDDI_VERSION >= 0x06000000
5724             DEFINE_RESULT(LVM_GETEMPTYTEXT);
5725             DEFINE_RESULT(LVM_GETFOOTERRECT);
5726             DEFINE_RESULT(LVM_GETFOOTERINFO);
5727             DEFINE_RESULT(LVM_GETFOOTERITEMRECT);
5728             DEFINE_RESULT(LVM_GETFOOTERITEM);
5729             DEFINE_RESULT(LVM_GETITEMINDEXRECT);
5730             DEFINE_RESULT(LVM_SETITEMINDEXSTATE);
5731             DEFINE_RESULT(LVM_GETNEXTITEMINDEX);
5732 #endif
5733         }
5734     }
5735     else if (sz[0] == TEXT('S') && lstrcmpi(szClass, WC_TREEVIEW) == 0)
5736     {
5737         switch (uMsg)
5738         {
5739             DEFINE_RESULT(TVM_INSERTITEMA);
5740             DEFINE_RESULT(TVM_DELETEITEM);
5741             DEFINE_RESULT(TVM_EXPAND);
5742             DEFINE_RESULT(TVM_GETITEMRECT);
5743             DEFINE_RESULT(TVM_GETCOUNT);
5744             DEFINE_RESULT(TVM_GETINDENT);
5745             DEFINE_RESULT(TVM_SETINDENT);
5746             DEFINE_RESULT(TVM_GETIMAGELIST);
5747             DEFINE_RESULT(TVM_SETIMAGELIST);
5748             DEFINE_RESULT(TVM_GETNEXTITEM);
5749             DEFINE_RESULT(TVM_SELECTITEM);
5750             DEFINE_RESULT(TVM_GETITEMA);
5751             DEFINE_RESULT(TVM_SETITEMA);
5752             DEFINE_RESULT(TVM_EDITLABELA);
5753             DEFINE_RESULT(TVM_GETEDITCONTROL);
5754             DEFINE_RESULT(TVM_GETVISIBLECOUNT);
5755             DEFINE_RESULT(TVM_HITTEST);
5756             DEFINE_RESULT(TVM_CREATEDRAGIMAGE);
5757             DEFINE_RESULT(TVM_SORTCHILDREN);
5758             DEFINE_RESULT(TVM_ENSUREVISIBLE);
5759             DEFINE_RESULT(TVM_SORTCHILDRENCB);
5760             DEFINE_RESULT(TVM_ENDEDITLABELNOW);
5761             DEFINE_RESULT(TVM_GETISEARCHSTRINGA);
5762             DEFINE_RESULT(TVM_SETTOOLTIPS);
5763             DEFINE_RESULT(TVM_GETTOOLTIPS);
5764             DEFINE_RESULT(TVM_SETINSERTMARK);
5765             DEFINE_RESULT(TVM_SETITEMHEIGHT);
5766             DEFINE_RESULT(TVM_GETITEMHEIGHT);
5767             DEFINE_RESULT(TVM_SETBKCOLOR);
5768             DEFINE_RESULT(TVM_SETTEXTCOLOR);
5769             DEFINE_RESULT(TVM_GETBKCOLOR);
5770             DEFINE_RESULT(TVM_GETTEXTCOLOR);
5771             DEFINE_RESULT(TVM_SETSCROLLTIME);
5772             DEFINE_RESULT(TVM_GETSCROLLTIME);
5773 #if NTDDI_VERSION >= 0x06000000
5774             DEFINE_RESULT(TVM_SETBORDER);
5775 #endif
5776             DEFINE_RESULT(TVM_SETINSERTMARKCOLOR);
5777             DEFINE_RESULT(TVM_GETINSERTMARKCOLOR);
5778             DEFINE_RESULT(TVM_GETITEMSTATE);
5779             DEFINE_RESULT(TVM_SETLINECOLOR);
5780             DEFINE_RESULT(TVM_GETLINECOLOR);
5781             DEFINE_RESULT(TVM_MAPACCIDTOHTREEITEM);
5782             DEFINE_RESULT(TVM_MAPHTREEITEMTOACCID);
5783 #if NTDDI_VERSION >= 0x06000000
5784             DEFINE_RESULT(TVM_SETEXTENDEDSTYLE);
5785             DEFINE_RESULT(TVM_GETEXTENDEDSTYLE);
5786 #endif
5787             DEFINE_RESULT(TVM_INSERTITEMW);
5788 #if NTDDI_VERSION >= 0x06000000
5789             DEFINE_RESULT(TVM_SETHOT);
5790             DEFINE_RESULT(TVM_SETAUTOSCROLLINFO);
5791 #endif
5792             DEFINE_RESULT(TVM_GETITEMW);
5793             DEFINE_RESULT(TVM_SETITEMW);
5794             DEFINE_RESULT(TVM_GETISEARCHSTRINGW);
5795             DEFINE_RESULT(TVM_EDITLABELW);
5796 #if NTDDI_VERSION >= 0x06000000
5797             DEFINE_RESULT(TVM_GETSELECTEDCOUNT);
5798             DEFINE_RESULT(TVM_SHOWINFOTIP);
5799             DEFINE_RESULT(TVM_GETITEMPARTRECT);
5800 #endif
5801         }
5802     }
5803 
5804     switch (uMsg)
5805     {
5806     DEFINE_RESULT(WM_NULL);
5807     DEFINE_RESULT(WM_CREATE);
5808     DEFINE_RESULT(WM_DESTROY);
5809     DEFINE_RESULT(WM_MOVE);
5810     DEFINE_RESULT(WM_SIZE);
5811     DEFINE_RESULT(WM_ACTIVATE);
5812     DEFINE_RESULT(WM_SETFOCUS);
5813     DEFINE_RESULT(WM_KILLFOCUS);
5814     DEFINE_RESULT(WM_ENABLE);
5815     DEFINE_RESULT(WM_SETREDRAW);
5816     DEFINE_RESULT(WM_SETTEXT);
5817     DEFINE_RESULT(WM_GETTEXT);
5818     DEFINE_RESULT(WM_GETTEXTLENGTH);
5819     DEFINE_RESULT(WM_PAINT);
5820     DEFINE_RESULT(WM_CLOSE);
5821 #ifndef _WIN32_WCE
5822     DEFINE_RESULT(WM_QUERYENDSESSION);
5823     DEFINE_RESULT(WM_QUERYOPEN);
5824     DEFINE_RESULT(WM_ENDSESSION);
5825 #endif
5826     DEFINE_RESULT(WM_QUIT);
5827     DEFINE_RESULT(WM_ERASEBKGND);
5828     DEFINE_RESULT(WM_SYSCOLORCHANGE);
5829     DEFINE_RESULT(WM_SHOWWINDOW);
5830     DEFINE_RESULT(WM_WININICHANGE);
5831     /* DEFINE_RESULT(WM_SETTINGCHANGE); */    /* same as WM_WININICHANGE */
5832     DEFINE_RESULT(WM_DEVMODECHANGE);
5833     DEFINE_RESULT(WM_ACTIVATEAPP);
5834     DEFINE_RESULT(WM_FONTCHANGE);
5835     DEFINE_RESULT(WM_TIMECHANGE);
5836     DEFINE_RESULT(WM_CANCELMODE);
5837     DEFINE_RESULT(WM_SETCURSOR);
5838     DEFINE_RESULT(WM_MOUSEACTIVATE);
5839     DEFINE_RESULT(WM_CHILDACTIVATE);
5840     DEFINE_RESULT(WM_QUEUESYNC);
5841     DEFINE_RESULT(WM_GETMINMAXINFO);
5842     DEFINE_RESULT(WM_PAINTICON);
5843     DEFINE_RESULT(WM_ICONERASEBKGND);
5844     DEFINE_RESULT(WM_NEXTDLGCTL);
5845     DEFINE_RESULT(WM_SPOOLERSTATUS);
5846     DEFINE_RESULT(WM_DRAWITEM);
5847     DEFINE_RESULT(WM_MEASUREITEM);
5848     DEFINE_RESULT(WM_DELETEITEM);
5849     DEFINE_RESULT(WM_VKEYTOITEM);
5850     DEFINE_RESULT(WM_CHARTOITEM);
5851     DEFINE_RESULT(WM_SETFONT);
5852     DEFINE_RESULT(WM_GETFONT);
5853     DEFINE_RESULT(WM_SETHOTKEY);
5854     DEFINE_RESULT(WM_GETHOTKEY);
5855     DEFINE_RESULT(WM_QUERYDRAGICON);
5856     DEFINE_RESULT(WM_COMPAREITEM);
5857 #ifndef _WIN32_WCE
5858     DEFINE_RESULT(WM_GETOBJECT);
5859 #endif
5860     DEFINE_RESULT(WM_COMPACTING);
5861     DEFINE_RESULT(WM_COMMNOTIFY);
5862     DEFINE_RESULT(WM_WINDOWPOSCHANGING);
5863     DEFINE_RESULT(WM_WINDOWPOSCHANGED);
5864     DEFINE_RESULT(WM_POWER);
5865     DEFINE_RESULT(WM_COPYDATA);
5866     DEFINE_RESULT(WM_CANCELJOURNAL);
5867     DEFINE_RESULT(WM_NOTIFY);
5868     DEFINE_RESULT(WM_INPUTLANGCHANGEREQUEST);
5869     DEFINE_RESULT(WM_INPUTLANGCHANGE);
5870     DEFINE_RESULT(WM_TCARD);
5871     DEFINE_RESULT(WM_HELP);
5872     DEFINE_RESULT(WM_USERCHANGED);
5873     DEFINE_RESULT(WM_NOTIFYFORMAT);
5874     DEFINE_RESULT(WM_CONTEXTMENU);
5875     DEFINE_RESULT(WM_STYLECHANGING);
5876     DEFINE_RESULT(WM_STYLECHANGED);
5877     DEFINE_RESULT(WM_DISPLAYCHANGE);
5878     DEFINE_RESULT(WM_GETICON);
5879     DEFINE_RESULT(WM_SETICON);
5880     DEFINE_RESULT(WM_NCCREATE);
5881     DEFINE_RESULT(WM_NCDESTROY);
5882     DEFINE_RESULT(WM_NCCALCSIZE);
5883     DEFINE_RESULT(WM_NCHITTEST);
5884     DEFINE_RESULT(WM_NCPAINT);
5885     DEFINE_RESULT(WM_NCACTIVATE);
5886     DEFINE_RESULT(WM_GETDLGCODE);
5887 #ifndef _WIN32_WCE
5888     DEFINE_RESULT(WM_SYNCPAINT);
5889 #endif
5890     DEFINE_RESULT(WM_NCMOUSEMOVE);
5891     DEFINE_RESULT(WM_NCLBUTTONDOWN);
5892     DEFINE_RESULT(WM_NCLBUTTONUP);
5893     DEFINE_RESULT(WM_NCLBUTTONDBLCLK);
5894     DEFINE_RESULT(WM_NCRBUTTONDOWN);
5895     DEFINE_RESULT(WM_NCRBUTTONUP);
5896     DEFINE_RESULT(WM_NCRBUTTONDBLCLK);
5897     DEFINE_RESULT(WM_NCMBUTTONDOWN);
5898     DEFINE_RESULT(WM_NCMBUTTONUP);
5899     DEFINE_RESULT(WM_NCMBUTTONDBLCLK);
5900     DEFINE_RESULT(WM_NCXBUTTONDOWN);
5901     DEFINE_RESULT(WM_NCXBUTTONUP);
5902     DEFINE_RESULT(WM_NCXBUTTONDBLCLK);
5903 #ifdef WM_INPUT_DEVICE_CHANGE
5904     DEFINE_RESULT(WM_INPUT_DEVICE_CHANGE);
5905 #endif
5906     DEFINE_RESULT(WM_INPUT);
5907     DEFINE_RESULT(WM_KEYDOWN);
5908     DEFINE_RESULT(WM_KEYUP);
5909     DEFINE_RESULT(WM_CHAR);
5910     DEFINE_RESULT(WM_DEADCHAR);
5911     DEFINE_RESULT(WM_SYSKEYDOWN);
5912     DEFINE_RESULT(WM_SYSKEYUP);
5913     DEFINE_RESULT(WM_SYSCHAR);
5914     DEFINE_RESULT(WM_SYSDEADCHAR);
5915     DEFINE_RESULT(WM_UNICHAR);
5916     DEFINE_RESULT(WM_IME_STARTCOMPOSITION);
5917     DEFINE_RESULT(WM_IME_ENDCOMPOSITION);
5918     DEFINE_RESULT(WM_IME_COMPOSITION);
5919     DEFINE_RESULT(WM_INITDIALOG);
5920     DEFINE_RESULT(WM_COMMAND);
5921     DEFINE_RESULT(WM_SYSCOMMAND);
5922     DEFINE_RESULT(WM_TIMER);
5923     DEFINE_RESULT(WM_HSCROLL);
5924     DEFINE_RESULT(WM_VSCROLL);
5925     DEFINE_RESULT(WM_INITMENU);
5926     DEFINE_RESULT(WM_INITMENUPOPUP);
5927     DEFINE_RESULT(WM_MENUSELECT);
5928 #if _WIN32_WINNT >= 0x0601
5929     DEFINE_RESULT(WM_GESTURE);
5930     DEFINE_RESULT(WM_GESTURENOTIFY);
5931 #endif
5932     DEFINE_RESULT(WM_MENUCHAR);
5933     DEFINE_RESULT(WM_ENTERIDLE);
5934 #ifndef _WIN32_WCE
5935     DEFINE_RESULT(WM_MENURBUTTONUP);
5936     DEFINE_RESULT(WM_MENUDRAG);
5937     DEFINE_RESULT(WM_MENUGETOBJECT);
5938     DEFINE_RESULT(WM_UNINITMENUPOPUP);
5939     DEFINE_RESULT(WM_MENUCOMMAND);
5940     DEFINE_RESULT(WM_CHANGEUISTATE);
5941     DEFINE_RESULT(WM_UPDATEUISTATE);
5942     DEFINE_RESULT(WM_QUERYUISTATE);
5943 #endif
5944     DEFINE_RESULT(WM_CTLCOLORMSGBOX);
5945     DEFINE_RESULT(WM_CTLCOLOREDIT);
5946     DEFINE_RESULT(WM_CTLCOLORLISTBOX);
5947     DEFINE_RESULT(WM_CTLCOLORBTN);
5948     DEFINE_RESULT(WM_CTLCOLORDLG);
5949     DEFINE_RESULT(WM_CTLCOLORSCROLLBAR);
5950     DEFINE_RESULT(WM_CTLCOLORSTATIC);
5951     DEFINE_RESULT(WM_MOUSEMOVE);
5952     DEFINE_RESULT(WM_LBUTTONDOWN);
5953     DEFINE_RESULT(WM_LBUTTONUP);
5954     DEFINE_RESULT(WM_LBUTTONDBLCLK);
5955     DEFINE_RESULT(WM_RBUTTONDOWN);
5956     DEFINE_RESULT(WM_RBUTTONUP);
5957     DEFINE_RESULT(WM_RBUTTONDBLCLK);
5958     DEFINE_RESULT(WM_MBUTTONDOWN);
5959     DEFINE_RESULT(WM_MBUTTONUP);
5960     DEFINE_RESULT(WM_MBUTTONDBLCLK);
5961     DEFINE_RESULT(WM_MOUSEWHEEL);
5962     DEFINE_RESULT(WM_XBUTTONDOWN);
5963     DEFINE_RESULT(WM_XBUTTONUP);
5964     DEFINE_RESULT(WM_XBUTTONDBLCLK);
5965 #if _WIN32_WINNT >= 0x0600
5966     DEFINE_RESULT(WM_MOUSEHWHEEL);
5967 #endif
5968     DEFINE_RESULT(WM_PARENTNOTIFY);
5969     DEFINE_RESULT(WM_ENTERMENULOOP);
5970     DEFINE_RESULT(WM_EXITMENULOOP);
5971     DEFINE_RESULT(WM_NEXTMENU);
5972     DEFINE_RESULT(WM_SIZING);
5973     DEFINE_RESULT(WM_CAPTURECHANGED);
5974     DEFINE_RESULT(WM_MOVING);
5975     DEFINE_RESULT(WM_POWERBROADCAST);
5976     DEFINE_RESULT(WM_DEVICECHANGE);
5977     DEFINE_RESULT(WM_MDICREATE);
5978     DEFINE_RESULT(WM_MDIDESTROY);
5979     DEFINE_RESULT(WM_MDIACTIVATE);
5980     DEFINE_RESULT(WM_MDIRESTORE);
5981     DEFINE_RESULT(WM_MDINEXT);
5982     DEFINE_RESULT(WM_MDIMAXIMIZE);
5983     DEFINE_RESULT(WM_MDITILE);
5984     DEFINE_RESULT(WM_MDICASCADE);
5985     DEFINE_RESULT(WM_MDIICONARRANGE);
5986     DEFINE_RESULT(WM_MDIGETACTIVE);
5987     DEFINE_RESULT(WM_MDISETMENU);
5988     DEFINE_RESULT(WM_ENTERSIZEMOVE);
5989     DEFINE_RESULT(WM_EXITSIZEMOVE);
5990     DEFINE_RESULT(WM_DROPFILES);
5991     DEFINE_RESULT(WM_MDIREFRESHMENU);
5992 #if WINVER >= 0x0602
5993     DEFINE_RESULT(WM_POINTERDEVICECHANGE);
5994     DEFINE_RESULT(WM_POINTERDEVICEINRANGE);
5995     DEFINE_RESULT(WM_POINTERDEVICEOUTOFRANGE);
5996 #endif
5997 #if WINVER >= 0x0601
5998     DEFINE_RESULT(WM_TOUCH);
5999 #endif
6000 #if WINVER >= 0x0602
6001     DEFINE_RESULT(WM_NCPOINTERUPDATE);
6002     DEFINE_RESULT(WM_NCPOINTERDOWN);
6003     DEFINE_RESULT(WM_NCPOINTERUP);
6004     DEFINE_RESULT(WM_POINTERUPDATE);
6005     DEFINE_RESULT(WM_POINTERDOWN);
6006     DEFINE_RESULT(WM_POINTERUP);
6007     DEFINE_RESULT(WM_POINTERENTER);
6008     DEFINE_RESULT(WM_POINTERLEAVE);
6009     DEFINE_RESULT(WM_POINTERACTIVATE);
6010     DEFINE_RESULT(WM_POINTERCAPTURECHANGED);
6011     DEFINE_RESULT(WM_TOUCHHITTESTING);
6012     DEFINE_RESULT(WM_POINTERWHEEL);
6013     DEFINE_RESULT(WM_POINTERHWHEEL);
6014 #endif
6015     DEFINE_RESULT(WM_IME_SETCONTEXT);
6016     DEFINE_RESULT(WM_IME_NOTIFY);
6017     DEFINE_RESULT(WM_IME_CONTROL);
6018     DEFINE_RESULT(WM_IME_COMPOSITIONFULL);
6019     DEFINE_RESULT(WM_IME_SELECT);
6020     DEFINE_RESULT(WM_IME_CHAR);
6021     DEFINE_RESULT(WM_IME_REQUEST);
6022     DEFINE_RESULT(WM_IME_KEYDOWN);
6023     DEFINE_RESULT(WM_IME_KEYUP);
6024     DEFINE_RESULT(WM_MOUSEHOVER);
6025     DEFINE_RESULT(WM_MOUSELEAVE);
6026     DEFINE_RESULT(WM_NCMOUSEHOVER);
6027     DEFINE_RESULT(WM_NCMOUSELEAVE);
6028     DEFINE_RESULT(WM_WTSSESSION_CHANGE);
6029 #if WINVER >= 0x0601
6030     DEFINE_RESULT(WM_DPICHANGED);
6031 #endif
6032     DEFINE_RESULT(WM_CUT);
6033     DEFINE_RESULT(WM_COPY);
6034     DEFINE_RESULT(WM_PASTE);
6035     DEFINE_RESULT(WM_CLEAR);
6036     DEFINE_RESULT(WM_UNDO);
6037     DEFINE_RESULT(WM_RENDERFORMAT);
6038     DEFINE_RESULT(WM_RENDERALLFORMATS);
6039     DEFINE_RESULT(WM_DESTROYCLIPBOARD);
6040     DEFINE_RESULT(WM_DRAWCLIPBOARD);
6041     DEFINE_RESULT(WM_PAINTCLIPBOARD);
6042     DEFINE_RESULT(WM_VSCROLLCLIPBOARD);
6043     DEFINE_RESULT(WM_SIZECLIPBOARD);
6044     DEFINE_RESULT(WM_ASKCBFORMATNAME);
6045     DEFINE_RESULT(WM_CHANGECBCHAIN);
6046     DEFINE_RESULT(WM_HSCROLLCLIPBOARD);
6047     DEFINE_RESULT(WM_QUERYNEWPALETTE);
6048     DEFINE_RESULT(WM_PALETTEISCHANGING);
6049     DEFINE_RESULT(WM_PALETTECHANGED);
6050     DEFINE_RESULT(WM_HOTKEY);
6051     DEFINE_RESULT(WM_PRINT);
6052     DEFINE_RESULT(WM_PRINTCLIENT);
6053     DEFINE_RESULT(WM_APPCOMMAND);
6054     DEFINE_RESULT(WM_THEMECHANGED);
6055 #ifdef WM_CLIPBOARDUPDATE
6056     DEFINE_RESULT(WM_CLIPBOARDUPDATE);
6057 #endif
6058 #if _WIN32_WINNT >= 0x0600
6059     DEFINE_RESULT(WM_DWMCOMPOSITIONCHANGED);
6060     DEFINE_RESULT(WM_DWMNCRENDERINGCHANGED);
6061     DEFINE_RESULT(WM_DWMCOLORIZATIONCOLORCHANGED);
6062     DEFINE_RESULT(WM_DWMWINDOWMAXIMIZEDCHANGE);
6063 #endif
6064 #if _WIN32_WINNT >= 0x0601
6065     DEFINE_RESULT(WM_DWMSENDICONICTHUMBNAIL);
6066     DEFINE_RESULT(WM_DWMSENDICONICLIVEPREVIEWBITMAP);
6067 #endif
6068 #if WINVER >= 0x0600
6069     DEFINE_RESULT(WM_GETTITLEBARINFOEX);
6070 #endif
6071     default:
6072         if (WM_USER <= uMsg && uMsg < WM_APP)
6073         {
6074             MSGDUMP_TPRINTF(TEXT("%sWM_USER+%u(hwnd:%p, lResult:%p)\n"),
6075                             MSGDUMP_PREFIX, uMsg - WM_USER, (void *)hwnd, (void *)lResult);
6076         }
6077         else if (WM_APP <= uMsg && uMsg < MAXINTATOM)
6078         {
6079             MSGDUMP_TPRINTF(TEXT("%sWM_APP+%u(hwnd:%p, lResult:%p)\n"),
6080                             MSGDUMP_PREFIX, uMsg - WM_APP, (void *)hwnd, (void *)lResult);
6081         }
6082         else if (MAXINTATOM <= uMsg && uMsg <= MAXWORD &&
6083                  GetClipboardFormatName(uMsg, szMsg, _countof(szMsg)))
6084         {
6085             MSGDUMP_TPRINTF(TEXT("%sWM_%u[\"%s\"](hwnd:%p, lResult:%p)\n"),
6086                             MSGDUMP_PREFIX, uMsg, szMsg, (void *)hwnd, (void *)lResult);
6087         }
6088         else
6089         {
6090             MSGDUMP_TPRINTF(TEXT("%sWM_%u(hwnd:%p, lResult:%p)\n"),
6091                             MSGDUMP_PREFIX, uMsg, (void *)hwnd, (void *)lResult);
6092         }
6093 #undef DEFINE_RESULT
6094     }
6095     return 0;
6096 }
6097 
6098 #endif
6099