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

commit 4c23b78b5e71913a1a6604bf55615b0475f22ff6
Author:     Giannis Adamopoulos <[email protected]>
AuthorDate: Tue Jan 16 11:36:34 2018 +0200
Commit:     Giannis Adamopoulos <[email protected]>
CommitDate: Tue Jan 16 11:50:51 2018 +0200

    [BROWSEUI] CISFBand: Handle DBID_SETWINDOWTHEME. CORE-14176
---
 dll/win32/browseui/CMakeLists.txt         | 2 +-
 dll/win32/browseui/shellbars/CISFBand.cpp | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/dll/win32/browseui/CMakeLists.txt 
b/dll/win32/browseui/CMakeLists.txt
index 161c45fb59..85b269fb1f 100644
--- a/dll/win32/browseui/CMakeLists.txt
+++ b/dll/win32/browseui/CMakeLists.txt
@@ -45,7 +45,7 @@ add_library(browseui SHARED
 
 set_module_type(browseui win32dll UNICODE)
 target_link_libraries(browseui shellbars atlnew uuid wine)
-add_importlibs(browseui shlwapi shell32 comctl32 gdi32 ole32 oleaut32 user32 
advapi32 msvcrt kernel32 ntdll)
+add_importlibs(browseui uxtheme shlwapi shell32 comctl32 gdi32 ole32 oleaut32 
user32 advapi32 msvcrt kernel32 ntdll)
 add_pch(browseui precomp.h SOURCE)
 add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
 
diff --git a/dll/win32/browseui/shellbars/CISFBand.cpp 
b/dll/win32/browseui/shellbars/CISFBand.cpp
index 670e647a23..8d538c21ac 100644
--- a/dll/win32/browseui/shellbars/CISFBand.cpp
+++ b/dll/win32/browseui/shellbars/CISFBand.cpp
@@ -10,6 +10,8 @@
 
 #include <commoncontrols.h>
 #include <shellapi.h>
+#include <wingdi.h>
+#include <uxtheme.h>
 
 /*
 TODO:
@@ -431,6 +433,13 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
 
         if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
         {
+            if (nCmdID == DBID_SETWINDOWTHEME)
+            {
+                if (pvaIn && V_VT(pvaIn) == VT_BSTR && V_BSTR(pvaIn))
+                {
+                    SetWindowTheme(m_hWnd, V_BSTR(pvaIn), NULL);
+                }
+            }
             return S_OK;
         }
         

Reply via email to