bluejamesbond 0 Newbie Poster

I am trying to create a simple transparent window where I can draw with Direct2D.

So far what I have done:

  1. Created window
  2. Set style to WS_EX_LAYERED
  3. Set alpha color key as #FFF
  4. Draw using Windows Graphics a white rectangle
  5. Now window is transparent with per-pixel alpha
  6. Then make a target out of the window and draw using Direct2D
  7. Make ALPHA_PREMULIPLIED target
  8. Clear with #FFF with 0.0f alpha (With 0.0 alpha to clear out the window apparently)
  9. 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.