473,395 Members | 1,949 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,395 software developers and data experts.

Windows explorer icons

I'm trying to create a windows explorer like app and the problem I'm having
is getting the proper icon for the folders and items.

In windows explorer there are many different icons and most seem to be in
the shell32.dll. The problem is that there also seems to be custom icons
that are installed by applications.

For example, "My Music" In My Documents has an icon that is different from
the normal folders. I have installed an application that has put its own
icon.

As far as I can tell windows seems to take the icon from the desktop.ini
because when I deleted it for the application I also removed the displayed
icon and it reverted back to the default.

So, if this is the case then its not to hard to get the default icon as I
just have to parse the desktop.ini... but which icon is used(I suppose its
not to hard to find out if I just load the resources in the dll but I'd like
a definite answer).

Also, What about the default icons? I can manually try and match what goes
where by getting the file type and extension but this seems a little like
hacking. Surely windows explorer doesn't do this? Or if it does then is
there any documentation of exactly which icons do what. Ofcourse I don't
have to follow its scheme exactly for directories as there are only a few
cases(My computer, My network places, recycle bin, etc..) but I need to know
how to extract the icon for the associated file type. (i.e., an .h has that
icon with an h in it, etc...).

The thing is, is that for some "directories" in windows explorer such as "My
shared folders" there are custom icons(or what looks to be) but no
corresponding ini. I'm not sure if windows explorer is hard coding the icons
for this or what? (ofcourse this is a special folder so I suppose it
probably does).

I'd just like to be able to get a similar structure for consistancy and not
have anything hard coded(incase there is a change in the system then my
application will reflect that change(i.e., someone changing the icons used)
except for files which, ofcourse, I need to be consistant because its
impossible to deal with all the possibilities. I don't mind hard coding
custom icons for the file directories though as there seems to be only a few
cases.

It would be nice if there was an associated icon in
System.Enviroment.SpecialFolder.xxx (instead of just the path). I suppose I
could look for desktop.ini in the dir and then load the icon if thats what
windows explorer does(but I think it hard codes them for "Special folders").
Any ideas?

Thanks
Jon
Oct 12 '06 #1
1 5062
>
For example, "My Music" In My Documents has an icon that is different from
the normal folders. I have installed an application that has put its own
icon.

As far as I can tell windows seems to take the icon from the desktop.ini
because when I deleted it for the application I also removed the displayed
icon and it reverted back to the default.
duh... didn't see the "IconIndex" ;/ must be going blind ;/
Oct 12 '06 #2

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

Similar topics

4
by: What-a-Tool | last post by:
Is possible to use the windows image list for icon display in my treeview control? Would appreciate it you could point me towards a code sample or Key phrase to use in a google search. Thanks...
5
by: WRH | last post by:
Hello This must be on a faq somewhere but despite a lot of googling I still can't resolve this issue: I have a C# app and I would like to see its icon displayed when the exe file is viewed in...
1
by: Max Khitrov | last post by:
Hello everyone, I'm working on a VS .NET add-in that will allow developers to use Subversion software from within the IDE (much like Source Safe). Ideally, I would like for my plug-in to be able...
4
by: pamelafluente | last post by:
Hi guys, I have a little question (hope it's not dumb) ;-) I have a form, containing a TreeView, say TreeView1, I want to to add a file to the tree: Sub AddFile(ByVal MyFile As...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I was thinking my desktop application a bit easy but when i try to list the open window i got a trouble. I can list my own apps windows but cant list other windows. For Example:: If i run...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Overview NOTE- This complete article on "Windows Autorun FAQs" applies theoretically to all Windows NT-based OSes till Windows Vista (and probably Vista's successors too)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.