MFC CImage alpha blending gone wrong
I have to present images on a picture control that are a composition of two PNG files, where the top image has transparent pixels on certain positions. The result should of plotter.png with bar.png overlapped on its top appears as (Notice the strange white contours on the bar): but it should be: The code I made for it is simple as CImage image; if (FAILED(image.Load(L"plotter.png"))) return false; CImage imageBar; if (FAILED(imageBar.Load(L"bar.png"))) return false; imageBar.AlphaBlend(image.GetDC(), CPoint()); image.ReleaseDC(); ((CStatic*)GetDlgItem(IDC_PICTURE))->SetBitmap(image); I have