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

commit f9e50f5471f0c44848996dcb4596a94b0ce5dd3f
Author:     Mark Jansen <[email protected]>
AuthorDate: Mon Jan 14 20:50:37 2019 +0100
Commit:     Giannis Adamopoulos <[email protected]>
CommitDate: Tue Jan 15 14:34:53 2019 +0200

    [ATL] Add GET_X_LPARAM and GET_Y_LPARAM to atlwin.h
    Remove all local definitions
---
 base/applications/msconfig_new/comctl32ex/comctl32supp.h | 4 ----
 base/shell/explorer/precomp.h                            | 3 ---
 dll/shellext/stobject/precomp.h                          | 3 ---
 dll/win32/browseui/internettoolbar.cpp                   | 4 ----
 dll/win32/browseui/shellbars/shellbars.h                 | 3 ---
 dll/win32/browseui/toolsband.cpp                         | 4 ----
 dll/win32/shell32/shellmenu/CMenuToolbars.cpp            | 3 ---
 sdk/lib/atl/atlwin.h                                     | 9 +++++++++
 8 files changed, 9 insertions(+), 24 deletions(-)

diff --git a/base/applications/msconfig_new/comctl32ex/comctl32supp.h 
b/base/applications/msconfig_new/comctl32ex/comctl32supp.h
index e426eaec4d..a671d1c970 100644
--- a/base/applications/msconfig_new/comctl32ex/comctl32supp.h
+++ b/base/applications/msconfig_new/comctl32ex/comctl32supp.h
@@ -10,10 +10,6 @@
 #define __COMCTL32SUPP_H__
 
 #include <windowsx.h>
-/*
-#define GET_X_LPARAM(lp)    ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp)    ((int)(short)HIWORD(lp))
-*/
 
 #define Button_IsEnabled(hwndCtl) IsWindowEnabled((hwndCtl))
 
diff --git a/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h
index e62b6efbb7..1db8538dce 100644
--- a/base/shell/explorer/precomp.h
+++ b/base/shell/explorer/precomp.h
@@ -64,9 +64,6 @@ extern HANDLE hProcessHeap;
 extern HKEY hkExplorer;
 extern BOOL bExplorerIsShell;
 
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 /*
  * explorer.c
  */
diff --git a/dll/shellext/stobject/precomp.h b/dll/shellext/stobject/precomp.h
index cefd8ea16e..674a32ebf0 100644
--- a/dll/shellext/stobject/precomp.h
+++ b/dll/shellext/stobject/precomp.h
@@ -34,9 +34,6 @@ extern HINSTANCE g_hInstance;
 #define ID_ICON_HOTPLUG (WM_APP + 0x4CC)
 #define ID_ICON_POWER   (WM_APP + 0x4CD)
 
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 #include "csystray.h"
 
 typedef HRESULT(STDMETHODCALLTYPE * PFNSTINIT)     (_In_ CSysTray * pSysTray);
diff --git a/dll/win32/browseui/internettoolbar.cpp 
b/dll/win32/browseui/internettoolbar.cpp
index a48efd61e2..d6f6145553 100644
--- a/dll/win32/browseui/internettoolbar.cpp
+++ b/dll/win32/browseui/internettoolbar.cpp
@@ -25,10 +25,6 @@ toolbar, and address band for an explorer window
 
 #include "precomp.h"
 
-/* FIXME, I can't include windowsx because it conflicts with some #defines */
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 #if 1
 
 interface IAugmentedShellFolder : public IShellFolder
diff --git a/dll/win32/browseui/shellbars/shellbars.h 
b/dll/win32/browseui/shellbars/shellbars.h
index 59221c4e28..a9ad17a8d2 100644
--- a/dll/win32/browseui/shellbars/shellbars.h
+++ b/dll/win32/browseui/shellbars/shellbars.h
@@ -31,9 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(browseui);
 #include "CBandSiteMenu.h"
 #include "CISFBand.h"
 
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 #define USE_SYSTEM_ISFBAND 0
 
 #if USE_SYSTEM_ISFBAND
diff --git a/dll/win32/browseui/toolsband.cpp b/dll/win32/browseui/toolsband.cpp
index 1e855cb660..5e98f7b2f1 100644
--- a/dll/win32/browseui/toolsband.cpp
+++ b/dll/win32/browseui/toolsband.cpp
@@ -24,10 +24,6 @@ Implements the toolbar band of a cabinet window
 
 #include "precomp.h"
 
-/* FIXME, I can't include windowsx because it conflicts with some #defines */
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 class CToolsBand :
     public CWindowImpl<CToolsBand, CWindow, CControlWinTraits>,
     public CComObjectRootEx<CComMultiThreadModelNoCS>,
diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp 
b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
index fd98086e4a..2431ee84c9 100644
--- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
+++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
@@ -28,9 +28,6 @@
 
 #define IDS_MENU_EMPTY 34561
 
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-
 WINE_DEFAULT_DEBUG_CHANNEL(CMenuToolbars);
 
 // FIXME: Enable if/when wine comctl supports this flag properly
diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h
index a4f717c7c2..3539c13afa 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -52,6 +52,15 @@ inline LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex)
 namespace ATL
 {
 
+#ifndef GET_X_LPARAM
+#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
+#endif
+#ifndef GET_Y_LPARAM
+#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
+#endif
+
+
+
 struct _ATL_WNDCLASSINFOW;
 typedef _ATL_WNDCLASSINFOW CWndClassInfo;
 

Reply via email to