   About background in 3D
  I want to create a 3D desktop pets.I've been trying some method still can't transparent the 3D pet's background.So,excuse me,How can I make the 3D's background transparent, just as the 3D pet randomly rambling on the desktop.  (I use DirectX and VB.NET)Thanks in advance.   
  To blend things transparently into the desktop, you need to use GDI.   ;  You can't easily do this. The best way would be to take a snapshot of the desktop, and then to use that as a fake backdrop for your app.   ;  You could use GDI to colour key your 3d onto the desktop (using TransparentBlt or similar). I'm not sure about speed issues though, since you'd have to convert your D3D image into GDI before the blt.   ;  Sorry,I  don't really understand the meaning what legalize and Jerax said,could you give me some example?  thanks   ;  I've seen various people try to tackle this problem over the years. Unless people found solutions and kept it secret I'm not aware of any robust or performant way of achieving this.You could explore the GDI route, but for the reason that Jerax posted it almost certainly won't be fast enough for any sort of real-time animation.I believe older examples of this used DirectDraw Overlays, which allowed for very fast blitting of 2D images over the top of the desktop. I doubt that route is still available though...Jack   ;  This is a fairly academic point, since it relies on not only Vista, but full-on Aero Glass...but for anyone interested in the subject, I just thought I'd make mention of this article someone showed me recently:http://www.codeproject.com/directx/umvistad3d.aspIn particular, the "Points of Interest" section:Quote:If you remove the WM_SIZEBOX style flag from the window class, something rather cool happens. You have now effectively told the DWM that there is no non-client area that it needs to draw and so instead it just composits your client area's contents directly, alpha channel and all. The window itself seems to disappear (visually) and you are left with a perfectly composited 3D spinning cube.;Quote:Original post by jollyjeffersI've seen various people try to tackle this problem over the years. Unless people found solutions and kept it secret I'm not aware of any robust or performant way of achieving this.Oh, the GDI route is certainly robust.  Its just not fast.  The reason we have DirectX in the first place is because GDI is not fast.Quote:I believe older examples of this used DirectDraw Overlays, which allowed for very fast blitting of 2D images over the top of the desktop. I doubt that route is still available though...Oh, they're still there.  Windows is the master of backwards compatability.  They might not be there on Vista, I'm not sure, but since Vista has a superior solution anyway (Aero, WPF, etc.), you probably wouldn't want to use DirectDraw there.You never noticed that every SDK has ddraw.h?  You can still code against older versions of DirectX interfaces no problem.  Its just having the documentation handy that's hard to do nowadays.   ;  Thanks a lot,everybodyI'll try these methods above.m(_ _)m   