AlphaBlend(), UpdateLayeredWindow() and 16-bit color mode

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello,

I have a problem with alpha-blended images when display mode is 16-bit color.
My application uses off-screen drawing on memory DC with a 32-bit 8-8-8-8 ARGB DIB section selected into it. (CreateDIBSection() with BitmapV4Header color and alpha masks. And pixels are pre-multiplied by alpha).

Then the final buffer is an argument for UpdateLayeredWindow().

It works great in 32-bit color mode, but when the display is in 16-bit color mode the resulting window looks like shadow of itself (almost fully transparent).

I've tried to start the application in 32-color display mode and then switch to 16-bit color. In this case it works well.

Any ideas how to make it working in 16-bit color mode?

Regards,

Andrew
.