Click here to Skip to main content
15,902,189 members

Comments by XTAL256 (Top 20 by date)

XTAL256 20-Nov-18 17:42pm View    
The code is quite complex, and it will be hard to make a simple example to demonstrate my problem.

However, since you prompted me to look at the code again, I think I see what the problem is. The code that converts HICON to GDI+ Bitmap tries to do some tricky stuff with the alpha channel of 32-bpp icons.

Specifically, my code is calling Bitmap::FromHBITMAP and passing the icon's colour bitmap (obtained from GetIconInfo). It then copies the pixel data to the GDI+ bitmap.
If I call Bitmap::FromHICON instead, then the 8-bit alpha channel is not preserved and the 1-bit mask is used instead.

I will investigate that code further.
XTAL256 19-Nov-18 19:54pm View    
path.Substring(2) will chop off the first 2 characters of path. Is this what you want? I would expect either the full path or just the file name (which would be relative to the current directory).
XTAL256 22-Jan-12 21:22pm View    
I have seen this method mentioned in other forums, when i was searching for the PowerShell way the other day. But those people just gave an example of two or more files. I didn't think of using a wildcard.
I doubt it would be much faster, but i could give it a go.

EDIT: Wow, that's super fast! I don't have access to the actual files at the moment, so i just tried it on some dummy data, but the operation took only a few seconds for 1000 files of 3Kb each.

thanks
XTAL256 22-Jan-12 18:24pm View    
Hmm, i know i am/could use C++ and PowerShell, but my question was not limited to them. But i will use those tags at your request.
XTAL256 6-Oct-11 22:58pm View    
I have actually heard of this behaviour, and i think Richard is right that the custom build rule will be skipped. I am not sure if it's correct, i just read it somewhere. It does sound strange, though.