diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c index c313aa8..39674e4 100644 --- a/dll/win32/comctl32/button.c +++ b/dll/win32/comctl32/button.c @@ -1178,8 +1178,10 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc) RECT r = *rc; INT n; #ifdef __REACTOS__ +#ifndef _USER32_ BOOL bHasIml = BUTTON_DrawIml(hdc, &infoPtr->imlData, &r, TRUE, 0); -#endif +#endif /*_USER32_*/ +#endif /*__REACTOS__*/ /* Calculate label rectangle according to label type */ switch (style & (BS_ICON|BS_BITMAP)) @@ -1229,12 +1231,19 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc) default: empty_rect: +#ifdef __REACTOS__ +#ifndef _USER32_ + if (bHasIml) + break; +#endif /*_USER32_*/ +#endif /*__REACTOS__*/ rc->right = r.left; rc->bottom = r.top; return (UINT)-1; } #ifdef __REACTOS__ +#ifndef _USER32_ if (bHasIml) { if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT) @@ -1246,7 +1255,8 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc) else if (infoPtr->imlData.uAlign == BUTTON_IMAGELIST_ALIGN_BOTTOM) r.bottom = infoPtr->imlData.margin.bottom; } -#endif +#endif /*_USER32_*/ +#endif /*__REACTOS__*/ /* Position label inside bounding rectangle according to * alignment flags. (calculated rect is always left-top aligned). @@ -1319,9 +1329,11 @@ static void BUTTON_DrawLabel(const BUTTON_INFO *infoPtr, HDC hdc, UINT dtFlags, */ #ifdef __REACTOS__ +#ifndef _USER32_ RECT rcText = *rc; BUTTON_DrawIml(hdc, &infoPtr->imlData, &rcText, FALSE, 0); -#endif +#endif /*_USER32_*/ +#endif /*__REACTOS__*/ if ((style & BS_PUSHLIKE) && (state & BST_INDETERMINATE)) {