Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3670
Number of posts: 9122

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Multiple icons for a single file type (extension) Posted by dhiriel on 31 Jul 2008 at 4:05 AM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.