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

commit 6940d9fdf0cde5575ecfaa947c76a5bd61910203
Author:     Mark Jansen <mark.jan...@reactos.org>
AuthorDate: Sun Dec 16 01:21:53 2018 +0100
Commit:     Mark Jansen <mark.jan...@reactos.org>
CommitDate: Mon Dec 17 20:38:38 2018 +0100

    [EXPLORER] Add TWM_GETTASKSWITCH, which seems to be used on windows
    to get a handle to the task switch control.
    This can then be used to send messages to it, like hiding/showing buttons
    CORE-15424
---
 base/shell/explorer/precomp.h   | 1 +
 base/shell/explorer/traywnd.cpp | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h
index 0f49ee6b5e..e62b6efbb7 100644
--- a/base/shell/explorer/precomp.h
+++ b/base/shell/explorer/precomp.h
@@ -130,6 +130,7 @@ HRESULT WINAPI _CBandSite_CreateInstance(LPUNKNOWN 
pUnkOuter, REFIID riid, void
  * traywnd.c
  */
 
+#define TWM_GETTASKSWITCH (WM_USER + 236)
 #define TWM_OPENSTARTMENU (WM_USER + 260)
 #define TWM_SETTINGSCHANGED (WM_USER + 300)
 
diff --git a/base/shell/explorer/traywnd.cpp b/base/shell/explorer/traywnd.cpp
index ebea58e150..466e766da1 100644
--- a/base/shell/explorer/traywnd.cpp
+++ b/base/shell/explorer/traywnd.cpp
@@ -2801,6 +2801,12 @@ HandleTrayContextMenu:
         return TRUE;
     }
 
+    LRESULT OnGetTaskSwitch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& 
bHandled)
+    {
+        bHandled = TRUE;
+        return (LRESULT)m_TaskSwitch;
+    }
+
     LRESULT OnHotkey(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
     {
         return HandleHotKey(wParam);
@@ -3119,6 +3125,7 @@ HandleTrayContextMenu:
         MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged)
         MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu)
         MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows)
+        MESSAGE_HANDLER(TWM_GETTASKSWITCH, OnGetTaskSwitch)
     ALT_MSG_MAP(1)
     END_MSG_MAP()
 

Reply via email to