title: How to get a fully transparent backbuffer in directx 9 without vista Desktop Window Manager
body: <p>I currently have an activex control that initiates a media (video/audio) framework another development group in my company developed and I am providing a window handle to that code. That handle is being used by their rendering plugin in the pipeline that uses Direct3d for rendering the video using that handle.</p>
  
  <p>I have seperate LPDIRECT3D9EX and LPDIRECT3DDEVICE9EX pointers that I initialize in my activex control.  I am trying to clear a backbuffer to transparent and then use directx drawing primatives to draw on that backbuffer producing a transparent window with my drawing primatives over the streaming video on the directx surface below.</p>
  
  <p>It appears that clearing a device backbuffer with full alpha transparency is ignored by directx.</p>
  
  <pre><code>d3ddev-&gt;Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_RGBA(0, 0, 1, 0 /*full alpha*/), 1.0f, 0);
  </code></pre>
  
  <p>I can see the object I draw but they are drawn on top of a backbuffer that has the RGB color specified without the alpha value.  The project linked (<a href="http://www.codeproject.com/KB/directx/umvistad3d.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/directx/umvistad3d.aspx</a>) to in the stackoverflow question below does what I want but requires vista's Desktop Window Manager and won't work for XP.</p>
  
  <p><a href="https://stackoverflow.com/questions/148275/how-do-i-draw-transparent-directx-content-in-a-transparent-window">How do I draw transparent DirectX content in a transparent window?</a></p>
  
  <ul>
  <li>I have tried with D3DRS_ALPHABLENDENABLE true with configured blend with no avail.</li>
  <li>I have also tried to have pixels with full alpha values not rendered using D3DRS_ALPHATESTENABLE, D3DRS_ALPHAREF, and D3DRS_ALPHAFUNC setup but this doesn't work either.  </li>
  <li>I have tried using ColorFill with alpha after retrieving the backbuffer with GetBackBuffer but this doesn't work either. (again only RGB is used)</li>
  <li>Finally I have tried creating a texture, selecting a surface, colorfilling that surface with a fully transparent alpha value, then loading that surface onto the backbuffer but only the RGB values appear to be used.</li>
  </ul>
  
  <p>I have checked the capabilities using the DXCapsViewer.exe and the D3DFMT_A8R8G8B8 backbuffer format that I am using for the backbuffer is valid so it can't be that.</p>
  
  <p>Has anyone gotten a transparent backbuffer in directx to work in XP?</p>