I am trying to add an image to a column on a TDbgrid that takes transparency into account. When drawing the image from a TImageList on the canvas in the DBGridDrawColumnCell procedure, I need the background of the image (the same color as the pixel in the lower left corner) to take on transparency. I want this transparency area to show the highlight color or non-highlight color, especially when themes are used, such as Aero. I have been able to accomplish this in older versions of Windows with color values of clHighlight or clWindow as the background color. But with Aero themes, it always paints a box behind the non-transparent part of the image instead of the gradient blue highlight color that Aero uses. How can I accomplish this?
I believe I am supposed to use alpha channel but I'm not sure how to do this from a TImageList to a canvas. I believe the cell is painted completely with the actual highlight color before I start drawing on the canvas in the cell. I just want to draw the non-transparency part of the image and leave the background.