Windows explorer icons

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Slaughter

    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


  • Jon Slaughter

    #2
    Re: Windows explorer icons

    >
    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 ;/


    Comment

    Working...