>From c7efa4102a286914a6d7f98096079b349d6dd17b Mon Sep 17 00:00:00 2001 From: Peter Schellenbach Date: Wed, 14 Sep 2011 18:58:00 -0700 Subject: comctl32/statusbar: fix missing icon in ownerdraw panels --- dlls/comctl32/status.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 1cb69eb..43b65aa 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -207,6 +207,7 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART UINT border = BDR_SUNKENOUTER; HTHEME theme = GetWindowTheme (infoPtr->Self); int themePart = SP_PANE; + int x = 0; TRACE("part bound %s\n", wine_dbgstr_rect(&r)); if (part->style & SBT_POPOUT) @@ -224,6 +225,12 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART else DrawEdge(hdc, &r, border, BF_RECT|BF_ADJUST); + if (part->hIcon) { + INT cy = r.bottom - r.top; + DrawIconEx (hdc, r.left + 2, r.top, part->hIcon, cy, cy, 0, 0, DI_NORMAL); + x = 2 + cy; + } + if (part->style & SBT_OWNERDRAW) { DRAWITEMSTRUCT dis; @@ -233,15 +240,9 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART dis.hDC = hdc; dis.rcItem = r; dis.itemData = (ULONG_PTR)part->text; - SendMessageW (infoPtr->Notify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); + SendMessageW (infoPtr->Notify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); } else { - if (part->hIcon) { - INT cy = r.bottom - r.top; - - r.left += 2; - DrawIconEx (hdc, r.left, r.top, part->hIcon, cy, cy, 0, 0, DI_NORMAL); - r.left += cy; - } + r.left += x; DrawStatusTextW (hdc, &r, part->text, SBT_NOBORDERS); } } -- 1.7.4.1