From 1979ab3c2b3b33a0da7d6af89c2e38d3f37fd514 Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Wed, 3 Aug 2005 12:32:59 +0000 Subject: [PATCH] Add support for the BT_NONE background type. --- dlls/uxtheme/draw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 1c56de93898..d938cd995ad 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -842,6 +842,9 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId, if(!hTheme) return E_HANDLE; + GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); + if (bgtype == BT_NONE) return S_OK; + /* Ensure we have a DTBGOPTS structure available, simplifies some of the code */ opts = pOptions; if(!opts) opts = &defaultOpts; @@ -856,7 +859,6 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId, } CopyRect(&rt, pRect); - GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); if(bgtype == BT_IMAGEFILE) hr = UXTHEME_DrawImageBackground(hTheme, hdc, iPartId, iStateId, &rt, opts); else if(bgtype == BT_BORDERFILL) @@ -1121,7 +1123,9 @@ HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, return E_HANDLE; GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); - if(bgtype == BT_IMAGEFILE) + if (bgtype == BT_NONE) + /* do nothing */; + else if(bgtype == BT_IMAGEFILE) hr = get_image_part_size (hTheme, hdc, iPartId, iStateId, prc, eSize, &size); else if(bgtype == BT_BORDERFILL) hr = get_border_background_size (hTheme, iPartId, iStateId, eSize, &size);