[SHELL32] -CMenuBand: forward WM_WININICHANGE to CMenuToolbarBase so that when themes...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 17 Jun 2017 07:43:52 +0000 (07:43 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 17 Jun 2017 07:43:52 +0000 (07:43 +0000)
svn path=/trunk/; revision=75072

reactos/dll/win32/shell32/shellmenu/CMenuBand.cpp
reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp

index 1e87eac..78b10e3 100644 (file)
@@ -720,6 +720,13 @@ HRESULT STDMETHODCALLTYPE CMenuBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wPa
         BOOL bFlatMenus;
         SystemParametersInfo(SPI_GETFLATMENU, 0, &bFlatMenus, 0);
         AdjustForTheme(bFlatMenus);
+
+        if (m_staticToolbar)
+            m_staticToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
+
+        if (m_SFToolbar)
+            m_SFToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
+
         return S_OK;
     }
 
index 9a1a967..38f8b62 100644 (file)
@@ -113,6 +113,11 @@ HRESULT CMenuToolbarBase::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
             return S_OK;
         }
         return S_FALSE;
+    case WM_WININICHANGE:
+        if (wParam == SPI_SETFLATMENU)
+        {
+            SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
+        }
     }
 
     return S_FALSE;