473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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>
Nov 16 '05 #1
0 1255

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mehdi Mousavi | last post by:
Hi, I need to know how to extract a specific icon (32x32 for instance) from an icon file that contains more than one icon size? Any help would be highly appreciated, Cheers. Mehdi
2
by: Alexander Keßler | last post by:
Hi, I want to programm some kind of Explorer like the Windows Explorer. And I want to know how can i get the same Icons/Symbols for the files and directories like the Windows Explorer uses. ...
7
by: Alexander Keßler | last post by:
Hi, I asked u this morning: --------------------------------------- I want to programm some kind of Explorer like the Windows Explorer. And I want to know how can i get the same Icons/Symbols...
5
by: yxq | last post by:
Hello The icons with the alpha channel are supported in WindowsXP. If use the System.Drawing.Bitmap.ToBitmap on the icon handle(ico.ToBitmap), the alpha channel won't be preserved, resulting in an...
8
by: Dinesh Jain | last post by:
Hi al,, I have written a code which displays directory listing of files from FTP server directory.I display all the files in a listview with its associated icons. To display icons, I get the...
4
by: techspirit | last post by:
Hi all, 1) I found out from the vb.net group that it is possible to get an associated icon for a file. My requirement is to display all programs from the Start Menu for the user along with the...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
7
by: =?Utf-8?B?QmVu?= | last post by:
Hi I am looking for a way to extraxt an icon from a .exe file an save it as an icon not a bitmap or jpeg to a file? The code below extracts the icon but only as a bitmap PictureBox1.Image =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.