Index: reactos/dll/win32/uxtheme/draw.c =================================================================== --- reactos/dll/win32/uxtheme/draw.c (revision 75147) +++ reactos/dll/win32/uxtheme/draw.c (working copy) @@ -286,28 +286,23 @@ BOOL hasImageAlpha, INT* transparent, COLORREF* transparentcolor, BOOL glyph) { - if (hasImageAlpha) - { + BOOL trans = FALSE; + GetThemeBool(hTheme, iPartId, iStateId, + glyph ? TMT_GLYPHTRANSPARENT : TMT_TRANSPARENT, &trans); + if (trans) { + *transparent = ALPHABLEND_BINARY; + if(FAILED(GetThemeColor(hTheme, iPartId, iStateId, + glyph ? TMT_GLYPHTRANSPARENTCOLOR : TMT_TRANSPARENTCOLOR, + transparentcolor))) { + /* If image is transparent, but no color was specified, use magenta */ + *transparentcolor = RGB(255, 0, 255); + } + } else if (hasImageAlpha) { *transparent = ALPHABLEND_FULL; *transparentcolor = RGB (255, 0, 255); + } else { + *transparent = ALPHABLEND_NONE; } - else - { - BOOL trans = FALSE; - GetThemeBool(hTheme, iPartId, iStateId, - glyph ? TMT_GLYPHTRANSPARENT : TMT_TRANSPARENT, &trans); - if(trans) { - *transparent = ALPHABLEND_BINARY; - if(FAILED(GetThemeColor(hTheme, iPartId, iStateId, - glyph ? TMT_GLYPHTRANSPARENTCOLOR : TMT_TRANSPARENTCOLOR, - transparentcolor))) { - /* If image is transparent, but no color was specified, use magenta */ - *transparentcolor = RGB(255, 0, 255); - } - } - else - *transparent = ALPHABLEND_NONE; - } } /*********************************************************************** Index: reactos/win32ss/gdi/dib/dib24bpp.c =================================================================== --- reactos/win32ss/gdi/dib/dib24bpp.c (revision 75147) +++ reactos/win32ss/gdi/dib/dib24bpp.c (working copy) @@ -409,6 +409,8 @@ LONG SrcHeight; LONG SrcWidth; + iTransColor &= 0x00FFFFFF; + DstHeight = DestRect->bottom - DestRect->top; DstWidth = DestRect->right - DestRect->left; SrcHeight = SourceRect->bottom - SourceRect->top; @@ -429,7 +431,7 @@ SourceSurf->sizlBitmap.cx > SourceX && SourceSurf->sizlBitmap.cy > SourceY) { Source = DIB_GetSourceIndex(SourceSurf, SourceX, SourceY); - if(Source != iTransColor) + if((Source & 0x00FFFFFF) != iTransColor) { Dest = XLATEOBJ_iXlate(ColorTranslation, Source) & 0xFFFFFF; *(PUSHORT)(DestBits) = Dest & 0xFFFF; Index: reactos/win32ss/gdi/dib/dib32bpp.c =================================================================== --- reactos/win32ss/gdi/dib/dib32bpp.c (revision 75147) +++ reactos/win32ss/gdi/dib/dib32bpp.c (working copy) @@ -292,6 +292,8 @@ LONG SrcHeight; LONG SrcWidth; + iTransColor &= 0x00FFFFFF; + DstHeight = DestRect->bottom - DestRect->top; DstWidth = DestRect->right - DestRect->left; SrcHeight = SourceRect->bottom - SourceRect->top; @@ -312,7 +314,7 @@ SourceSurf->sizlBitmap.cx > SourceX && SourceSurf->sizlBitmap.cy > SourceY) { Source = DIB_GetSourceIndex(SourceSurf, SourceX, SourceY); - if (Source != iTransColor) + if ((Source & 0x00FFFFFF) != iTransColor) { *DestBits = XLATEOBJ_iXlate(ColorTranslation, Source); } Index: reactos/win32ss/gdi/ntgdi/bitblt.c =================================================================== --- reactos/win32ss/gdi/ntgdi/bitblt.c (revision 75147) +++ reactos/win32ss/gdi/ntgdi/bitblt.c (working copy) @@ -219,6 +219,8 @@ BOOL Ret = FALSE; EXLATEOBJ exlo; + TransColor &= 0x00FFFFFF; + if ((hdcDst == NULL) || (hdcSrc == NULL)) { EngSetLastError(ERROR_INVALID_PARAMETER);