开发者

Different icons for files with same extension but different content?

I have associated a certain xml-based file-type of mine (.xmlentity) to my app (.net) and I would like to have different icons based on content (root element name) of these files.

<note xmlns="mynamespace"></note> should have one kind of icon and

<notebook xmlns="mynamespace"></notebook> should have another.

Is this possible somehow without having different file-extensions?

开发者_开发技巧

Its okey if its only working on Windows 7.


You are looking for Icon Handler. It is implemented as a shell extension. Unfortunately, MSDN does not give any icon-handler-specific sample code, but at least this article describes requirements for such shell extension. This article also can be useful: Creating Shell Extension Handlers.


Unfortunately not. One icon for one filetype. However I have seen programs create a preview by plugging into the shell (Windows Photo Viewer is a basic example of this. "Trackmania" also has preview screenshots of its data files)

Shell Preview Host on MSDN


I was wondering about this and found the answer in this link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜