Author: gadamopoulos
Date: Fri Aug  5 09:06:30 2016
New Revision: 72111

URL: http://svn.reactos.org/svn/reactos?rev=72111&view=rev
Log:
[EXPLORER]
- Fix subclassing the tasks toolbar which was broken in r65274. 
CORE-11532

Modified:
    trunk/reactos/base/shell/explorer/taskswnd.cpp

Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskswnd.cpp?rev=72111&r1=72110&r2=72111&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/taskswnd.cpp      [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskswnd.cpp      [iso-8859-1] Fri Aug  5 
09:06:30 2016
@@ -160,8 +160,29 @@
         return SetButtonInfo(iButtonIndex, &tbbi) != 0;
     }
 
+    LRESULT OnNcHitTestToolbar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& 
bHandled)
+    {
+        POINT pt;
+
+        /* See if the mouse is on a button */
+        pt.x = GET_X_LPARAM(lParam);
+        pt.y = GET_Y_LPARAM(lParam);
+        ScreenToClient(&pt);
+
+        INT index = HitTest(&pt);
+        if (index < 0)
+        {
+            /* Make the control appear to be transparent outside of any 
buttons */
+            return HTTRANSPARENT;
+        }
+
+        bHandled = FALSE;
+        return 0;
+    }
+
 public:
     BEGIN_MSG_MAP(CNotifyToolbar)
+        MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTestToolbar)
     END_MSG_MAP()
 
     BOOL Initialize(HWND hWndParent)
@@ -1683,26 +1704,6 @@
         return TRUE;
     }
 
-    LRESULT OnNcHitTestToolbar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& 
bHandled)
-    {
-        POINT pt;
-
-        /* See if the mouse is on a button */
-        pt.x = GET_X_LPARAM(lParam);
-        pt.y = GET_Y_LPARAM(lParam);
-        ScreenToClient(&pt);
-
-        INT index = m_TaskBar.HitTest(&pt);
-        if (index < 0)
-        {
-            /* Make the control appear to be transparent outside of any 
buttons */
-            return HTTRANSPARENT;
-        }
-
-        bHandled = FALSE;
-        return 0;
-    }
-
     LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& 
bHandled)
     {
         LRESULT Ret = TRUE;
@@ -1828,8 +1829,6 @@
         MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
         MESSAGE_HANDLER(WM_TIMER, OnTimer)
         MESSAGE_HANDLER(m_ShellHookMsg, HandleShellHookMsg)
-    ALT_MSG_MAP(1)
-        MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTestToolbar)
     END_MSG_MAP()
 
     HWND _Init(IN HWND hWndParent, IN OUT ITrayWindow *tray)


Reply via email to