On October 13, 2002 12:57 pm, Carlos wrote: > Changelog: > * Changed SRCPAINT to SRCCOPY, the first time what > it paints in hImageDC.
> } else if (himl->hbmMask) { > BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, lx, ly, SRCAND ); > - BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, lx, ly, SRCPAINT ); > + if (!bIsTransparent && himl->hbmMask) { > + BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, lx, ly, SRCPAINT ); > + } else { > + BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, lx, ly, SRCCOPY ); > + } This can not be right. It is equivalent to: PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY); SelectObject(hImageDC, hOldBrush); } - } else if (himl->hbmMask) { + } else if (himl->hbmMask && !(fStyle & ILD_TRANSPARENT) && clrBk != CLR_NONE) { BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, lx, ly, SRCAND ); BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, lx, ly, SRCPAINT ); } else { /* the image is opaque, just copy it */ TRACE(" - Image is opaque\n"); BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, lx, ly, SRCCOPY); } That is, if we have ILD_TRANSPARENT set, or clrBk == CLR_NONE, we go the SRCCOPY route, ignoring the mask, which is just the opposite of what we need to do! Alexandre, please do not apply it. -- Dimi.