https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8002fc065d724693364d…
commit a8002fc065d724693364db3b9527cdbbf2950a38
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Feb 16 17:27:25 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Feb 16 17:27:25 2019 +0900
msgdump.h undocumented drag & drop support (#1359)
In sdk/include/reactos/msgdump.h, support Drag & Drop undocumented messages.
---
sdk/include/reactos/msgdump.h | 64 +++++++++++++++++++++++++++++++++++++++++--
sdk/include/reactos/winxx.h | 56 +++++++++++++++++++++++++++++++++++--
2 files changed, 115 insertions(+), 5 deletions(-)
diff --git a/sdk/include/reactos/msgdump.h b/sdk/include/reactos/msgdump.h
index 696cbb7302..f69fd4a68d 100644
--- a/sdk/include/reactos/msgdump.h
+++ b/sdk/include/reactos/msgdump.h
@@ -5,7 +5,7 @@
* COPYRIGHT: Copyright 2018 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
*/
#ifndef _INC_MSGDUMP
-#define _INC_MSGDUMP
+#define _INC_MSGDUMP 2 /* Version 2 */
/*
* NOTE: MD_msgdump function in this file provides Win32API message dump feature.
@@ -14,7 +14,9 @@
*/
#pragma once
-#include "winxx.h" /* An unofficial extension of <windowsx.h>. */
+#ifndef _INC_WINXX
+ #include "winxx.h" /* An unofficial extension of <windowsx.h>.
*/
+#endif
#include <strsafe.h>
#ifndef MSGDUMP_TPRINTF
@@ -938,6 +940,56 @@ MD_MDIGetActive(HWND hwnd)
return NULL;
}
+#ifdef _UNDOCUSER_H
+ static __inline LRESULT MSGDUMP_API
+ MD_OnDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_DROPOBJECT(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+
+ static __inline LRESULT MSGDUMP_API
+ MD_OnQueryDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_QUERYDROPOBJECT(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+
+ static __inline LRESULT MSGDUMP_API
+ MD_OnBeginDrag(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_BEGINDRAG(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+
+ static __inline LRESULT MSGDUMP_API
+ MD_OnDragLoop(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_DRAGLOOP(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+
+ static __inline LRESULT MSGDUMP_API
+ MD_OnDragSelect(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_DRAGSELECT(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+
+ static __inline LRESULT MSGDUMP_API
+ MD_OnDragMove(HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+ MSGDUMP_TPRINTF(TEXT("%sWM_DRAGMOVE(hwnd:%p, wParam:%p,
lParam:%p)\n"),
+ MSGDUMP_PREFIX, (void *)hwnd, (void *)wParam, (void *)lParam);
+ return 0;
+ }
+#endif
+
static __inline HMENU MSGDUMP_API
MD_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow)
{
@@ -2916,6 +2968,14 @@ MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HANDLE_MSG(hwnd, WM_MDICASCADE, MD_MDICascade);
HANDLE_MSG(hwnd, WM_MDIICONARRANGE, MD_MDIIconArrange);
HANDLE_MSG(hwnd, WM_MDIGETACTIVE, MD_MDIGetActive);
+#ifdef _UNDOCUSER_H
+ HANDLE_MSG(hwnd, WM_DROPOBJECT, MD_OnDropObject);
+ HANDLE_MSG(hwnd, WM_QUERYDROPOBJECT, MD_OnQueryDropObject);
+ HANDLE_MSG(hwnd, WM_BEGINDRAG, MD_OnBeginDrag);
+ HANDLE_MSG(hwnd, WM_DRAGLOOP, MD_OnDragLoop);
+ HANDLE_MSG(hwnd, WM_DRAGSELECT, MD_OnDragSelect);
+ HANDLE_MSG(hwnd, WM_DRAGMOVE, MD_OnDragMove);
+#endif
HANDLE_MSG(hwnd, WM_MDISETMENU, MD_MDISetMenu);
HANDLE_MSG(hwnd, WM_ENTERSIZEMOVE, MD_OnEnterSizeMove);
HANDLE_MSG(hwnd, WM_EXITSIZEMOVE, MD_OnExitSizeMove);
diff --git a/sdk/include/reactos/winxx.h b/sdk/include/reactos/winxx.h
index b7538de6d0..beb4a532cb 100644
--- a/sdk/include/reactos/winxx.h
+++ b/sdk/include/reactos/winxx.h
@@ -2,11 +2,11 @@
* PROJECT: ReactOS header files
* LICENSE: CC-BY-4.0 (
https://spdx.org/licenses/CC-BY-4.0.html)
* PURPOSE: An unofficial extension of <windowsx.h>
- * COPYRIGHT: Copyright 2017-2018 Katayama Hirofumi MZ
(katayama.hirofumi.mz(a)gmail.com)
+ * COPYRIGHT: Copyright 2017-2019 Katayama Hirofumi MZ
(katayama.hirofumi.mz(a)gmail.com)
*/
#ifndef _INC_WINXX
-#define _INC_WINXX
+#define _INC_WINXX 2 /* Version 2 */
#pragma once
@@ -26,7 +26,7 @@
#ifndef HANDLE_WM_NULL
#define HANDLE_WM_NULL(hwnd, wParam, lParam, fn) \
((fn)((hwnd)), 0L)
-#define FORWARD_WM_NULL(hwnd, compactRatio, fn) \
+#define FORWARD_WM_NULL(hwnd, fn) \
(void)((fn)((hwnd), WM_NULL, 0, 0L), 0L)
#endif
@@ -1044,4 +1044,54 @@
#define HANDLE_SBM_GETSCROLLBARINFO(hwnd, wParam, lParam, fn) \
(LRESULT)(INT_PTR)(BOOL)(fn)((hwnd), (LPSCROLLBARINFO)(lParam))
+#ifdef _UNDOCUSER_H /* UNDOCUMENTED */
+ /* LRESULT Cls_OnDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_DROPOBJECT
+ #define HANDLE_WM_DROPOBJECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_DROPOBJECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_DROPOBJECT, wParam, lParam))
+ #endif
+
+ /* LRESULT Cls_OnQueryDropObject(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_QUERYDROPOBJECT
+ #define HANDLE_WM_QUERYDROPOBJECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_QUERYDROPOBJECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_QUERYDROPOBJECT, wParam, lParam))
+ #endif
+
+ /* LRESULT Cls_OnBeginDrag(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_BEGINDRAG
+ #define HANDLE_WM_BEGINDRAG(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_BEGINDRAG(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_BEGINDRAG, wParam, lParam))
+ #endif
+
+ /* LRESULT Cls_OnDragLoop(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_DRAGLOOP
+ #define HANDLE_WM_DRAGLOOP(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_DRAGLOOP(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_DRAGLOOP, wParam, lParam))
+ #endif
+
+ /* LRESULT Cls_OnDragSelect(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_DRAGSELECT
+ #define HANDLE_WM_DRAGSELECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_DRAGSELECT(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_DRAGSELECT, wParam, lParam))
+ #endif
+
+ /* LRESULT Cls_OnDragMove(HWND hwnd, WPARAM wParam, LPARAM lParam) */
+ #ifndef HANDLE_WM_DRAGMOVE
+ #define HANDLE_WM_DRAGMOVE(hwnd, wParam, lParam, fn) \
+ (LRESULT)(fn)((hwnd), (wParam), (lParam))
+ #define FORWARD_WM_DRAGMOVE(hwnd, wParam, lParam, fn) \
+ (LRESULT)((fn)((hwnd), WM_DRAGMOVE, wParam, lParam))
+ #endif
+#endif
+
#endif