From: "Sean Dockery" Subject: Re: selectobject Date: 18 May 1999 00:00:00 GMT Message-ID: <7hsnr7$d351@forums.borland.com> References: <7hpqp8$a9h4@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Cybersurf Interactive Media X-MSMail-Priority: Normal Newsgroups: borland.public.delphi.graphics Transparent bitmaps are not really transparent. Transparency is achieved through several raster operations on an background image that make the result look as if the transparent image has been pasted on top of the background image. The traditional method of transparency blitting involves three different BitBlt calls: the first applies the transparency mask, the second applies the image, and the third undoes the transparency mask. A second method (which I use) has been coined as the black source method. It eliminates one of the BitBlt calls in the traditional method. It requires a monochrome mask; a transparency mask has colour information, and a monochrome mask does not. It also requires some modification of the source image. Basically, you replace your transparency colour with black--hence, black source. What this means is that (one way or another) you are going to require a mask which can be applied before you blit your real image. I highly recommend that you look through all of the following Microsoft knowledge base articles about transparency; the second article applies to an API behaviour issue Windows 95 and NT 3.51 client machines. SAMPLE: TRANSBLT Demonstrates Bitmaps with Transparency http://support.microsoft.com/support/kb/articles/q97/3/65.asp PRB: Trouble Using DIBSection as a Monochrome Mask http://support.microsoft.com/support/kb/articles/q149/5/85.asp HOWTO: Drawing Transparent Bitmaps http://support.microsoft.com/support/kb/articles/q79/2/12.asp Here's my recommendations 1. Use the black source method if you can. It is easier and faster. 2. Generate your monochrome mask and black source images at design time. It is more reliable. PS: If you need help after reading the examples provided by Microsoft, I would be happy to help you out if you get stuck. Good luck. -- Sean Dockery Cybersurf Corp, Interactive Media Division mailto:sean.dockery@cybersurf.net http://www.cybersurf.net/ Russell E. Holcomb wrote in message news:7hpqp8$a9h4@forums.borland.com... > I am selecting a transparent bitmap from my main form into a memory dc and > bitblt it to screen. It is not longer transparent when I do this. Does > someone know how to maintain transparency while using bitblt? Thanks > > Russ