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 (With 0.0 alpha to clear out the window apparently)
- Window is now black and not transparent.
After following all this, I stil can't don't know how to make window to transparent. If you can point out my mistake, I would be obliged.