ID2D1HwndRenderTarget always having black background instead of transparent
I am trying to create a simple transparent window where I can draw with Direct2D. So far what I have done: Created window Set style to WS_EX_LAYERED Set alpha color key as #FFF Draw using Windows Graphics a white rectangle Now window is transparent with per-pixel alpha Then make a target out of the window and draw using Direct2D Make ALPHA _PREMULIPLIED target Clear with #FFF with 0.0f alpha Window is now black I just don't know how to make window to transparent. If you can point out my mistake, I would be obliged I don't think it's possible with directX. However GDI does work. Take a look at