But both the upper and the lower left pixels are white.
I don't understand that.
Sorry for the repeated edits... had some kind of glitch when saving...
Ok, the thing is that a 256 colour image, which is using an 8 bit pallette does not support alpha channel transparency. That requires a 32 bit pallette. So to compensate Windows uses whatever it finds in that upper left corner as the "transparency colour" for the entire image. If that spot is red, anything red in the image is not displayed so the background shows through. Thus, if you want a transparent background you need to make the entire background, including that hot spot, the same colour.
IcoFx is a pretty sophisticated editor and most likely what it did was to allow you to edit with transparency but when it saved the icon as 8bits it decided a unique colour for the background so that windows could pick it up as the transparency colour.
Pelles Editor being a bit more honest, did the right thing and showed you the actual background colour...
Take a look at my button bar icons... notice how the entire background is a medium gray colour... including the 0,0 pixel. When this is loaded into windows the result is that it sees the magic pixel and all that gray background is not displayed... The image background becomes transparent. The same would have happened with your icon if the 0,0 pixel was the same colour as the rest of the background.
Here's an example of how to load a 256 bit image for transparency...
if (Setting.Netbook)
{ bs = 32;
is = 24;
himu = ImageList_LoadImage(PgmInst,L"BIGBTN1",is,0,RGB(255,255,255),
IMAGE_BITMAP,LR_CREATEDIBSECTION | LR_LOADTRANSPARENT);
himl = ImageList_LoadImage(PgmInst,L"BIGBTN2",is,0,RGB(255,255,255),
IMAGE_BITMAP,LR_CREATEDIBSECTION | LR_LOADTRANSPARENT); }
In your code you would subistitute IMAGE_ICON and your icon's name in the program's resources.
Pelles editor doesn't display the transparency... it's up to you to predictively prepare your images for proper display. We are programmers, afterall
And here's the result...