[BROWSEUI] CISFBand: Handle DBID_SETWINDOWTHEME. CORE-14176
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 16 Jan 2018 09:36:34 +0000 (11:36 +0200)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 16 Jan 2018 09:50:51 +0000 (11:50 +0200)
dll/win32/browseui/CMakeLists.txt
dll/win32/browseui/shellbars/CISFBand.cpp

index 161c45f..85b269f 100644 (file)
@@ -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)
 
index 670e647..8d538c2 100644 (file)
@@ -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;
         }