PC Review


Reply
Thread Tools Rate Thread

Requesting a specific icon format or retrieving the entire icon directory for a system icon

 
 
Chris Martinez via .NET 247
Guest
Posts: n/a
 
      11th Mar 2005
I don't know if you ever got this resolved but I would becurious. The reason you can't get the folder icons is becauseyou are using SHGFI_FILE_ATTRIBUTES. Take that out and use thevalue of 0 instead of 256 for the file attribute flags.

Which operating system were you developing this with? I triedmany attempts, including your example, to get a system iconusing SHGetFileInfo and writing it to the browser as"image/x-icon" just as you've shown, but it will not rendercorrectly. Am I missing something?

I really need one of two possible solutions.

1) How to properly render an icon returned by SHGetFileInfo usingthe format it in the format it provides

OR

2) How to request an icon from SHGetFileInfo that is only 256colors. I have worked with numerous other icons and they allrender to the browser properly if you use an icon directoryindex that contains only 256 colors. I could directly extractthe icon from "shell32.dll" but that would defeat the point ofusing SHGetFileInfo and would not return icons for all files. Iwould have thought that the system would load the icons andreturn you a handle to the entire icon directory, but readingthe raws bytes it is clear that the system always returns asingle icon in the directory (but if you poke into the"shell32.dll" and other places you can clearly find 3 formatsfor each size in each icon). Therefore as an alternative toreturning the 256 color format, if there is a way to get theentire icon directory for a single system icon that work aswell. I can extract desired format from there.

Any help or direction is much appreciated.

Chris

--------------------------------
From: Chris Martinez

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>jmLA0D0i6ECqEGuh9s087g==</Id>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: System requesting system disc after disc clean up neil Windows XP Help 0 25th Apr 2010 04:22 PM
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski Microsoft ASP .NET 2 6th Sep 2007 04:58 PM
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski Microsoft VB .NET 1 6th Sep 2007 04:58 PM
converting entire directory of images to directory of thumbnails =?Utf-8?B?YmlyZG1hbg==?= Microsoft Frontpage 5 18th Jul 2004 08:20 PM
Hide hidden/system files in specific folder? not entire system chuck clark Windows XP General 2 26th Jun 2004 03:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 AM.