https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d5b88ff0aee4cb1629aa0e34197c234eb3f837e4

commit d5b88ff0aee4cb1629aa0e34197c234eb3f837e4
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sat Jun 1 16:21:33 2019 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Sat Jun 1 16:21:33 2019 +0900

    [SDK][INCLUDE] msgdump.h registered message support
---
 sdk/include/reactos/msgdump.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/sdk/include/reactos/msgdump.h b/sdk/include/reactos/msgdump.h
index 209ce545fed..514914a30c9 100644
--- a/sdk/include/reactos/msgdump.h
+++ b/sdk/include/reactos/msgdump.h
@@ -2,10 +2,10 @@
  * PROJECT:     ReactOS header files
  * LICENSE:     CC-BY-4.0 (https://spdx.org/licenses/CC-BY-4.0.html)
  * PURPOSE:     Win32API message dumping
- * COPYRIGHT:   Copyright 2018 Katayama Hirofumi MZ 
([email protected])
+ * COPYRIGHT:   Copyright 2018-2019 Katayama Hirofumi MZ 
([email protected])
  */
 #ifndef _INC_MSGDUMP
-#define _INC_MSGDUMP    4   /* Version 4 */
+#define _INC_MSGDUMP    5   /* Version 5 */
 
 /*
  * NOTE: MD_msgdump function in this file provides Win32API message dump 
feature.
@@ -61,6 +61,17 @@ MD_rect_text(TCHAR *buf, size_t bufsize, const RECT *prc)
 static __inline LRESULT MSGDUMP_API
 MD_OnUnknown(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+    TCHAR szName[64];
+    if (0xC000 <= uMsg && uMsg <= 0xFFFF &&
+        GlobalGetAtomName(uMsg, szName, ARRAYSIZE(szName)))
+    {
+        // RegisterWindowMessage'd message
+        MSGDUMP_TPRINTF(TEXT("%s'%s'(%u)(hwnd:%p, wParam:%p, lParam:%p)\n"),
+                        MSGDUMP_PREFIX, szName, uMsg, (void *)hwnd, (void 
*)wParam,
+                        (void *)lParam);
+        return 0;
+    }
+
     MSGDUMP_TPRINTF(TEXT("%sWM_%u(hwnd:%p, wParam:%p, lParam:%p)\n"),
                     MSGDUMP_PREFIX, uMsg, (void *)hwnd, (void *)wParam, (void 
*)lParam);
     return 0;

Reply via email to