[SHELL32] -CMenuBand: forward WM_WININICHANGE to CMenuToolbarBase so that when themes get enabled, the menu bar in explorer becomes flat immediately.

svn path=/trunk/; revision=75072
This commit is contained in:
Giannis Adamopoulos 2017-06-17 07:43:52 +00:00
parent 5a105b3163
commit 040ae7635a
2 changed files with 12 additions and 0 deletions

View 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;
}

View 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;