Windows 11 AlphaBlend Transparency Bug (AlphaFormat=0) - Solution: Use AC_SRC_ALPHA with Premultiplied Alpha
Its a duplicate of my post on SO, but I hope it may help someone here too.
After some Windows 11 updates, I have recently ran into a problem where GDI’s AlphaBlend function stopped working correctly when BLENDFUNCTION parameters SourceConstantAlpha != 0 and AlphaFormat = 0. It sporadically produces incorrect transparency output. I have an "Intel Iris Xe" video card where I cannot disable the HUGS (Hardware-Accelerated GPU Scheduling) to test if it is the root-cause. I wonder if anybody has this problem and how it is resolved.
The issue disappeared in the "Safe Mode" or when adding a Sleep(20) around the AlphaBlend calls but that’s not a real fix. The working solution at the moment is to use only pre-multiplied ARGB source bitmap with SourceConstantAlpha = 255 and AlphaFormat = AC_SRC_ALPHA in the BLENDFUNCTION parameter - then AlphaBlend works fine.