tags:

views:

273

answers:

1
+1  A: 

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
yes, it should be Graphics* g = Graphics::FromImage(h);
Manoj
ok, Thanks. I implemented sample program like this.
Manoj