comctl32: statusbar: Optimize STATUSBAR_RefreshPart.

This commit is contained in:
Mikołaj Zalewski 2008-07-22 21:30:54 +02:00 committed by Alexandre Julliard
parent 72d4318c8c
commit 9a70306c53
1 changed files with 4 additions and 15 deletions

View File

@ -252,15 +252,15 @@ static void
STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
{
HBRUSH hbrBk;
HFONT hOldFont;
HTHEME theme;
TRACE("item %d\n", itemID);
if (!IsWindowVisible (infoPtr->Self))
return;
if (part->bound.right < part->bound.left) return;
if (!RectVisible(hdc, &part->bound))
return;
if ((theme = GetWindowTheme (infoPtr->Self)))
{
RECT cr;
@ -278,18 +278,7 @@ STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPA
DeleteObject (hbrBk);
}
hOldFont = SelectObject (hdc, infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont);
STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
SelectObject (hdc, hOldFont);
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
RECT rect;
GetClientRect (infoPtr->Self, &rect);
STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
}
STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
}