I'm missing the 'copy' from your code:
Graphics* g = Graphics::FromImage(copy);
Looking at the images it appears that the device context you're drawing the icon to doesn't have 32-bit colors (alpha channel is missing).
Try creating a DC like this:
HDC hDC = CreateCompatibleDC(NULL);
and then select a 32-bit colored (empty) bitmap into that dc. After that you can draw the icon and save it.
Stefan
2009-11-30 21:12:04