I create a window with WS_EX_LAYERED and set a color key for it using SetLayeredWindowAttributes() . I can verify that this color key really creates a transparent patch in the window by drawing a simple rectangle using FillRect() inside the window. However, this does not work when I draw a window using DirectDraw. I create an IDirectDrawSurface7 in a window and I Blt() add a few pixels to it. some pixels are colored with a color key, but I do not see them transparent, they just appear in the color key.
Is there anything inherent in the DirectDraw surface that conflicts with the layered color keyboard of the window?
When I set the alpha value with SetLayeredWindowAttributes() , it looks like it works fine with the DirectDraw surface, and it really looks translucent.
source share