Index: base/shell/explorer/trayntfy.cpp =================================================================== --- base/shell/explorer/trayntfy.cpp (revision 67211) +++ base/shell/explorer/trayntfy.cpp (working copy) @@ -1427,6 +1427,7 @@ LRESULT DrawBackground(HDC hdc) { + HRESULT res; RECT rect; GetClientRect(&rect); @@ -1438,10 +1439,10 @@ DrawThemeParentBackground(m_hWnd, hdc, &rect); } - DrawThemeBackground(TrayTheme, hdc, TNP_BACKGROUND, 0, &rect, 0); + res = DrawThemeBackground(TrayTheme, hdc, TNP_BACKGROUND, 0, &rect, 0); } - return TRUE; + return res; } LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) Index: base/shell/explorer/traywnd.cpp =================================================================== --- base/shell/explorer/traywnd.cpp (revision 67211) +++ base/shell/explorer/traywnd.cpp (working copy) @@ -1838,6 +1838,7 @@ { RECT rect; int partId; + HRESULT res; GetClientRect(&rect); @@ -1860,11 +1861,10 @@ partId = TBP_BACKGROUNDBOTTOM; break; } - - DrawThemeBackground(m_Theme, hdc, partId, 0, &rect, 0); + res = DrawThemeBackground(m_Theme, hdc, partId, 0, &rect, 0); } - return TRUE; + return res; } LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) @@ -1911,7 +1911,10 @@ rect.bottom = rect.top + GetSystemMetrics(SM_CYSIZEFRAME); break; } - + if (IsThemeBackgroundPartiallyTransparent(m_Theme, backoundPart, 0)) + { + DrawThemeParentBackground(m_hWnd, hdc, &rect); + } DrawThemeBackground(m_Theme, hdc, backoundPart, 0, &rect, 0); ReleaseDC(m_hWnd, hdc); Index: dll/win32/comctl32/rebar.c =================================================================== --- dll/win32/comctl32/rebar.c (revision 67211) +++ dll/win32/comctl32/rebar.c (working copy) @@ -1831,6 +1831,17 @@ HRGN hrgn; GetClientRect (infoPtr->hwndSelf, &cr); + +#ifdef __REACTOS__ + if (theme) + { + if (IsThemeBackgroundPartiallyTransparent(theme, RP_BACKGROUND, 0)) + { + DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &cr); + } + DrawThemeBackground (theme, hdc, 0, 0, &cr, NULL); + } +#endif hrgn = CreateRectRgn(cr.left, cr.top, cr.right, cr.bottom); oldrow = -1; @@ -1921,6 +1932,9 @@ #endif } +#ifdef __REACTOS__ + if (!theme) +#else if (theme) { /* When themed, the background color is ignored (but not a @@ -1928,6 +1942,7 @@ DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand); } else +#endif { old = SetBkColor (hdc, new); TRACE("%s background color=0x%06x, band %s\n", @@ -1945,6 +1960,9 @@ } #if 1 +#ifdef __REACTOS__ + if (!theme) +#endif { //FIXME: Apparently painting the remaining area is a v6 feature HBRUSH hbrush = CreateSolidBrush(new); Index: dll/win32/uxtheme/draw.c =================================================================== --- dll/win32/uxtheme/draw.c (revision 67211) +++ dll/win32/uxtheme/draw.c (working copy) @@ -2043,6 +2043,7 @@ GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); + if (bgtype == BT_NONE) return TRUE; if (bgtype != BT_IMAGEFILE) return FALSE; if(FAILED (UXTHEME_LoadImage (hTheme, 0, iPartId, iStateId, &rect, FALSE, Index: dll/win32/uxtheme/msstyles.c =================================================================== --- dll/win32/uxtheme/msstyles.c (revision 67211) +++ dll/win32/uxtheme/msstyles.c (working copy) @@ -757,6 +757,7 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassList) { PTHEME_CLASS cls = NULL; + PTHEME_CLASS defaultCls = NULL; WCHAR szClassName[MAX_THEME_CLASS_NAME]; LPCWSTR start; LPCWSTR end; @@ -773,10 +774,14 @@ start = end+1; cls = MSSTYLES_FindClass(tf, pszAppName, szClassName); if(cls) break; + if (!defaultCls) + defaultCls = MSSTYLES_FindClass(tf, NULL, szClassName); } if(!cls && *start) { lstrcpynW(szClassName, start, sizeof(szClassName)/sizeof(szClassName[0])); cls = MSSTYLES_FindClass(tf, pszAppName, szClassName); + if (!defaultCls) + defaultCls = MSSTYLES_FindClass(tf, NULL, szClassName); } if(cls) { TRACE("Opened app %s, class %s from list %s\n", debugstr_w(cls->szAppName), debugstr_w(cls->szClassName), debugstr_w(pszClassList)); @@ -784,6 +789,14 @@ cls->tf->dwRefCount++; TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount); } + else if (defaultCls) + { + cls = defaultCls; + TRACE("Opened default class %s from list %s\n", debugstr_w(cls->szClassName), debugstr_w(pszClassList)); + cls->tf = tf; + cls->tf->dwRefCount++; + TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount); + } return cls; }