I'm trying to create a window that uses directx to draw opaque content on top of a transparent view (i.e. the desktop shows through). With DirectX11 I'm trying to do the following, but it's not making the background transparent. In fact, any opacity value I put in gives me the exact same results.

If you uncomment the DwmExtendFrameIntoClientArea call on line 119ish, then it gets the effect I'm looking for. I'm wondering if there's a way to get the same effect without the use of dwm (for reasons I won't go into).

Any ideas?

Edit: Added full source code of working example. Found out that if I make a call to DwmExtendFrameIntoClientArea, then I get the effect I want. But I'd still like to know if its possible to do it without using dwm apis.

Yes, I've already done that. However, for some reason the transparency color key specified in SetLayeredWindowAttributes is not working with my DirectX clear color.
–
SkydMay 4 '14 at 10:34

it works for me here, if you still have problem, paste full code please.
–
zddMay 4 '14 at 13:05

I managed to get it working by adding a call to DwmExtendFrameIntoClientArea. Did you have to do that as well? I'd prefer not to use Dwm for what I'm doing, so if your solution works without that call then I'll try to condense my code into a smaller repro and post the entire thing.
–
SkydMay 4 '14 at 23:24

No, I didn't use Dwm, I just use what I post above.
–
zddMay 5 '14 at 1:28

I added full code of a working repro. Thanks for your help so far zdd
–
SkydMay 5 '14 at 6:06