Commit 4b4cfff4 authored by Reece H. Dunn's avatar Reece H. Dunn Committed by Alexandre Julliard

comctl32: Fixed drawing the trackbar background when themes are installed.

parent 8422a64a
...@@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) ...@@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
HBITMAP hOldBmp = 0, hOffScreenBmp = 0; HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
NMCUSTOMDRAW nmcd; NMCUSTOMDRAW nmcd;
int gcdrf, icdrf; int gcdrf, icdrf;
HTHEME theme;
if (infoPtr->flags & TB_THUMBCHANGED) { if (infoPtr->flags & TB_THUMBCHANGED) {
TRACKBAR_UpdateThumb (infoPtr); TRACKBAR_UpdateThumb (infoPtr);
...@@ -868,8 +869,12 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) ...@@ -868,8 +869,12 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
/* Erase backbround */ /* Erase backbround */
if (gcdrf == CDRF_DODEFAULT || if (gcdrf == CDRF_DODEFAULT ||
notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) { notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
if (GetWindowTheme (infoPtr->hwndSelf)) if ((theme = GetWindowTheme (infoPtr->hwndSelf))) {
DrawThemeBackground (theme, hdc,
(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ?
TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcClient, 0);
DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient); DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient);
}
else else
FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE)); FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
if (gcdrf != CDRF_DODEFAULT) if (gcdrf != CDRF_DODEFAULT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment