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

This commit is contained in:
Reece H. Dunn 2007-10-07 16:52:55 +01:00 committed by Alexandre Julliard
parent 8422a64a3a
commit 4b4cfff4ba
1 changed files with 6 additions and 1 deletions

View File

@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
NMCUSTOMDRAW nmcd;
int gcdrf, icdrf;
HTHEME theme;
if (infoPtr->flags & TB_THUMBCHANGED) {
TRACKBAR_UpdateThumb (infoPtr);
@ -868,8 +869,12 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
/* Erase backbround */
if (gcdrf == CDRF_DODEFAULT ||
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);
}
else
FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
if (gcdrf != CDRF_DODEFAULT)