#include <commoncontrols.h>
#include <shlwapi_undoc.h>
#include <uxtheme.h>
+#include <vssym32.h>
#include "CMenuBand.h"
#include "CMenuToolbars.h"
isHot = m_hotBar == this && (int) cdraw->nmcd.dwItemSpec == m_hotItem;
isPopup = m_popupBar == this && (int) cdraw->nmcd.dwItemSpec == m_popupItem;
- if (m_initFlags & SMINIT_VERTICAL || IsAppThemed())
+ if ((m_initFlags & SMINIT_VERTICAL))
{
COLORREF clrText;
HBRUSH bgBrush;
UpdateImageLists();
// For custom-drawing
- SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
+ if (IsAppThemed())
+ GetThemeSysBool(GetWindowTheme(m_hWnd), TMT_FLATMENUS);
+ else
+ SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
return S_OK;
}
SetWindowTheme(m_hWnd, L"", L"");
- SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
+ if (IsAppThemed())
+ GetThemeSysBool(GetWindowTheme(m_hWnd), TMT_FLATMENUS);
+ else
+ SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
+
m_menuBand->AdjustForTheme(m_useFlatMenus);
// If needed, create the pager.
}
}
+#ifdef __REACTOS__
+ if (theme && !(dwItemCDFlag & TBCDRF_NOBACKGROUND))
+#else
if (theme)
+#endif
{
int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON;
int stateId = TS_NORMAL;
DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL);
}
+
+#ifdef __REACTOS__
+ if (!theme)
+#else
else
+#endif
TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
if (drawSepDropDownArrow)