GDI+ renders properly on Windows 7 but not XP

I'm making a simple game with C++ and GDI+. First, I create a Bitmap in memory that serves as a buffer. Then I load some images I want to draw into Bitmaps. I use LockBits on the images to set some of the pixels to be semi-transparent. I make CachedBitmaps from them and then I draw them to the buffer. I use BitBlt to copy the buffer to the screen. It works fine on Windows 7 but testing it on Windows XP using VirtualBox doesn't work quite right. The semi-transparent parts are all drawn at 0,0 while the opaque parts of the same image are drawn where they should be. If I use DrawImage instead of DrawCachedBitmap it works correctly. My first thought was that it's a problem with VirtualBox but I think that can be ruled out since it is simple GDI+ on Windows XP.

Any idea what could do this?

Here is an example:
http://imageshack.us/photo/my-images/535/gdiproblem.jpg/
It looks like the XP version thinks you want black pixels to be transparent. The easiest thing to do as a first step would be to make sure GDI is up to date on your VM. Nice graphics by the way.
I don't think I understand what you mean. I do want those black pixels to be transparent and they are in both versions. My problem is that it draws them in the the wrong place. The transparency is correct as far as I can tell. I wasn't able to find an update for GDI but I have XP sp3 with all updates so I think I should be ok.

Any other ideas?
Topic archived. No new replies allowed.