Re: ExtractAssociatedIcon
Quote:
Originally Posted by
Sharpie
My attempt was
WORD id;
HICON hc=ExtractAssociatedIcon(0, szfilename, &id);
where szfilename specified tha path to the icon file.
But the icon displayed as an unknown file icon.
Perhaps, uninitialized id contains some garbage, so it cannot be treated as the valid icon index? :confused:
Quote:
Originally Posted by
Sharpie
If I changed it into
WORD id=0;
HICON hc=ExtractAssociatedIcon(0, szfilename, &id);
then I would get icons with black background (without transparancy)
Any advice please ?
But this function does not display the icon! How do you know its background is black?
Re: ExtractAssociatedIcon
Thanks alot,
I know it because I have tested both of which I have stated above along with the final solution.
In the first case when no value is assigned, the icon is displayed as an unknown icon (it looks like an unidentified file icon in one's folder) while it is displayed as a non-transparent ico-image in the second case. The final solution provides a transparent image that I have no idea why so it does.
Re: ExtractAssociatedIcon
Hello, anybodys here ?
I would like to display icons in my listview control (report style), and as mentioned some icons extracted with initialised iconID equal to 0 result in non-transparent background images. Therefore, in Vista or Win7 I can still see the icon of a selected item but in XP the selected highlight color turns it off completely. Have you ever had this problem before ?
Thank you.
Re: ExtractAssociatedIcon
Which icons?
How do you display them in the listview control? Could you show your code?