Multiple icons for a single file type (extension) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Multiple icons for a single file type (extension)

In short terms, what I want to achieve is to have several file types used by my application using a file extension like ".myapp", but having different icons and even descriptions depending on what's actually on the file (ie: data vs. config files).
I know this is doable because MS Visual Studio does it: .sln (solution) files show an icon and description which depends on the tool and/or version used to create the solution (ie: Studio 2005, or C# 2008 Express), and this information is only found inside the file, in the first line. However, after browsing the register, I haven't been able to make any sense of it: there are several "classes" (and extensions) registered, such as ._sln71, ._sln80, and ._sln90; but there is no hint about how the .sln files are mapped to these classes based on content. My bet is that the Studio's "launcher" executable is doing this magic; but can't find anything beyond that point.

The main reason to do this is that my software is going to use many different filetypes (at least 20 types for data types, 3 or more for config files, and some helper files' types, such as "importable" scripts); and I don't want to flood my user's registries with dozens of new extensions; and I also want to avoid the risk of any of these extensions conflicting with an existing filetype; so I'm planning to use extensions in the form ".config.myapp", ".data.myapp", and so on (these are not the exact extensions, just examples).

Any help or advise will be appreciated.
Thanks in advance.
Sign In or Register to comment.