473,729 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "directorie s" 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.Envirome nt.SpecialFolde r.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 5096
>
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
10371
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
3607
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 windows explorer. The icon is an embedded resource and displays normally in the title bar when the app is opened.
1
2229
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 to modify icons that are displayed in Solution Explorer based on the file's status. So far I've been able to retrieve data from Solution Explorer using the UIHierarchy and related objects. Those give me access to the contents, but not to the...
4
1802
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 System.IO.FileInfo) Dim t As New TreeNode(MyFile.Name) Me.TreeView1.Nodes.Add(t) End Sub
3
7932
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 but the tray icon is not there. If I start the program after Windows has booted up the icon shows every time. I am assuming that the reason is due to the icon being created before the system tray is loaded/running. I have used a timer with...
1
1538
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 Corel Draw or Ms Paint how can i detect the mspaint or Coreldraw task in my desktop application's taskbar as you have seen in simple xp explorer's taskbar that whenever you run any application a button appears in task bar. and have effects about...
0
6122
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). Much of the contents of this article are tested on Windows XP professional SP2 by the author. Some instances of this article may be altogether different/missing on Windows Vista, XP and other Windows NT systems, but I have tried to write a...
0
8927
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9428
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9210
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8159
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3242
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2694
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.