windows 下对设置扩展名的显示图标

.htmledit_views img.right { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views img.left { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views .marker {background-color: #f5f21f;} .htmledit_views figure > figcaption { color: #a09a8e; } .htmledit_views a > img { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; outline-color: #1f80b0; } .htmledit_views .code-featured { border-top-color: #e31513; border-right-color: #e31513; border-bottom-color: #e31513; border-left-color: #e31513; } .htmledit_views .math-featured { box-shadow: #b51312 0px 0px 2px; background-color: rgba(227, 21, 19, 0.05); } .htmledit_views .image-clean { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; background-image: initial; background-color: initial; } .htmledit_views .image-grayscale { background-color: #fdf6eb; color: #6b6a67; } .htmledit_views p { color: #545455; } .htmledit_views h1, .htmledit_views h2, .htmledit_views h3, .htmledit_views h4, .htmledit_views h5, .htmledit_views h6 { color: #545455; } .htmledit_views blockquote { border-left-color: #e3dbcd; background-image: initial; background-color: #e4e5e9; } .htmledit_views blockquote p { color: #545455; } .htmledit_views hr { border-top-color: initial; border-right-color: initial; border-left-color: initial; border-bottom-color: #d0c9bb; } .htmledit_views table tr { border-right-color: initial; border-bottom-color: initial; border-left-color: initial; border-top-color: #e0d8ca; background-color: #fdf6eb; } .htmledit_views tbody { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views table tr:nth-child(2n) { background-color: #f5efe3; } .htmledit_views table tr td, .htmledit_views table tr th { border-top-color: #e0d8ca; border-right-color: #e0d8ca; border-bottom-color: #e0d8ca; border-left-color: #e0d8ca; color: #545455; } .htmledit_views table tr td p, .htmledit_views table tr th p { color: #545455; } .htmledit_views table tr th { background-color: #e5ecea; } .htmledit_views abbr[data-original-title], .htmledit_views abbr[title] { border-bottom-color: #a09a8e; } .marker { background-color: #f5f21f; } .htmledit_views kbd, .htmledit_views pre, .htmledit_views samp { color: #0d0d0d; } .htmledit_views a { color: #4ea0d7; text-decoration-color: initial; } .htmledit_views a:focus, .htmledit_views a:hover { color: #b81e24; } .htmledit_views a:visited { color: #6995b2; } .htmledit_views .flow-chart [fill=”#000”], .htmledit_views .flow-chart [fill=”#000000”], .htmledit_views .flow-chart [fill=”black”], .htmledit_views .sequence-diagram [fill=”#000”], .htmledit_views .sequence-diagram [fill=”#000000”], .htmledit_views .sequence-diagram [fill=”black”] { fill: #545455; } .htmledit_views .flow-chart [stroke=”#000000”], .htmledit_views .sequence-diagram [stroke=”#000000”] { stroke: #545455; } .htmledit_views .MathJax_SVG_Display { color: #545455; } .htmledit_views .prettyprint, .htmledit_views pre.prettyprint { background-color: #eaeef0; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views .prettyprint .pre-numbering { background-color: #e4e5e9; } .htmledit_views kbd { border-top-color: rgba(68, 70, 71, 0.25); border-right-color: rgba(68, 70, 71, 0.25); border-bottom-color: rgba(68, 70, 71, 0.25); border-left-color: rgba(68, 70, 71, 0.25); box-shadow: rgba(68, 70, 71, 0.25) 0px 1px 0px; background-color: #fdf6eb; color: #393a3d; } .htmledit_views code ol li div.hljs-ln-numbers { border-right-color: #cac3b5; .htmledit_views img.right { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views img.left { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views .marker {background-color: #f5f21f;} .htmledit_views figure > figcaption { color: #a09a8e; } .htmledit_views a > img { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; outline-color: #1f80b0; } .htmledit_views .code-featured { border-top-color: #e31513; border-right-color: #e31513; border-bottom-color: #e31513; border-left-color: #e31513; } .htmledit_views .math-featured { box-shadow: #b51312 0px 0px 2px; background-color: rgba(227, 21, 19, 0.05); } .htmledit_views .image-clean { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; background-image: initial; background-color: initial; } .htmledit_views .image-grayscale { background-color: #fdf6eb; color: #6b6a67; } .htmledit_views p { color: #545455; } .htmledit_views h1, .htmledit_views h2, .htmledit_views h3, .htmledit_views h4, .htmledit_views h5, .htmledit_views h6 { color: #545455; } .htmledit_views blockquote { border-left-color: #e3dbcd; background-image: initial; background-color: #e4e5e9; } .htmledit_views blockquote p { color: #545455; } .htmledit_views hr { border-top-color: initial; border-right-color: initial; border-left-color: initial; border-bottom-color: #d0c9bb; } .htmledit_views table tr { border-right-color: initial; border-bottom-color: initial; border-left-color: initial; border-top-color: #e0d8ca; background-color: #fdf6eb; } .htmledit_views tbody { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views table tr:nth-child(2n) { background-color: #f5efe3; } .htmledit_views table tr td, .htmledit_views table tr th { border-top-color: #e0d8ca; border-right-color: #e0d8ca; border-bottom-color: #e0d8ca; border-left-color: #e0d8ca; color: #545455; } .htmledit_views table tr td p, .htmledit_views table tr th p { color: #545455; } .htmledit_views table tr th { background-color: #e5ecea; } .htmledit_views abbr[data-original-title], .htmledit_views abbr[title] { border-bottom-color: #a09a8e; } .marker { background-color: #f5f21f; } .htmledit_views kbd, .htmledit_views pre, .htmledit_views samp { color: #0d0d0d; } .htmledit_views a { color: #4ea0d7; text-decoration-color: initial; } .htmledit_views a:focus, .htmledit_views a:hover { color: #b81e24; } .htmledit_views a:visited { color: #6995b2; } .htmledit_views .flow-chart [fill=”#000”], .htmledit_views .flow-chart [fill=”#000000”], .htmledit_views .flow-chart [fill=”black”], .htmledit_views .sequence-diagram [fill=”#000”], .htmledit_views .sequence-diagram [fill=”#000000”], .htmledit_views .sequence-diagram [fill=”black”] { fill: #545455; } .htmledit_views .flow-chart [stroke=”#000000”], .htmledit_views .sequence-diagram [stroke=”#000000”] { stroke: #545455; } .htmledit_views .MathJax_SVG_Display { color: #545455; } .htmledit_views .prettyprint, .htmledit_views pre.prettyprint { background-color: #eaeef0; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views .prettyprint .pre-numbering { background-color: #e4e5e9; } .htmledit_views kbd { border-top-color: rgba(68, 70, 71, 0.25); border-right-color: rgba(68, 70, 71, 0.25); border-bottom-color: rgba(68, 70, 71, 0.25); border-left-color: rgba(68, 70, 71, 0.25); box-shadow: rgba(68, 70, 71, 0.25) 0px 1px 0px; background-color: #fdf6eb; color: #393a3d; } .htmledit_views code ol li div.hljs-ln-numbers { border-right-color: #cac3b5;

        当程序需要创建一种新的文件格式,往往有这样一个需求:在文件列表显示的时候显示自己想要的图标,并且双击此文件就会使用指定的程序以指定的命令打开——就像 word,excel 那样。

        这种情况是通过注册表的设置来实现的,目前我还没了解实践指定程序打开,先说修改图标的方法。以下仅限描述修改位置,可以用不同语言程序通过不同方式编程实现。

        1. 在 HKEY_CLASSES_ROOT 分支上增加一个以 “.” 开头的扩展名的项,如 “.tzr”,设置一个值项:默认,REG_SZ,tzr_file。

        2. 在 HKEY_CLASSES_ROOT 分支上增加一个 “tzr_file” 项,增加新子项 “DefaultIcon”,设置:默认,REG_SZ,”c:\program files\tzrprogram\tzr.ico”

        是的,就这么简单!

            </div>

转载来源 https://blog.csdn.net/suppercoder/article/details/8307031

.htmledit_views img.right { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views img.left { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views .marker {background-color: #f5f21f;} .htmledit_views figure > figcaption { color: #a09a8e; } .htmledit_views a > img { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; outline-color: #1f80b0; } .htmledit_views .code-featured { border-top-color: #e31513; border-right-color: #e31513; border-bottom-color: #e31513; border-left-color: #e31513; } .htmledit_views .math-featured { box-shadow: #b51312 0px 0px 2px; background-color: rgba(227, 21, 19, 0.05); } .htmledit_views .image-clean { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; background-image: initial; background-color: initial; } .htmledit_views .image-grayscale { background-color: #fdf6eb; color: #6b6a67; } .htmledit_views p { color: #545455; } .htmledit_views h1, .htmledit_views h2, .htmledit_views h3, .htmledit_views h4, .htmledit_views h5, .htmledit_views h6 { color: #545455; } .htmledit_views blockquote { border-left-color: #e3dbcd; background-image: initial; background-color: #e4e5e9; } .htmledit_views blockquote p { color: #545455; } .htmledit_views hr { border-top-color: initial; border-right-color: initial; border-left-color: initial; border-bottom-color: #d0c9bb; } .htmledit_views table tr { border-right-color: initial; border-bottom-color: initial; border-left-color: initial; border-top-color: #e0d8ca; background-color: #fdf6eb; } .htmledit_views tbody { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views table tr:nth-child(2n) { background-color: #f5efe3; } .htmledit_views table tr td, .htmledit_views table tr th { border-top-color: #e0d8ca; border-right-color: #e0d8ca; border-bottom-color: #e0d8ca; border-left-color: #e0d8ca; color: #545455; } .htmledit_views table tr td p, .htmledit_views table tr th p { color: #545455; } .htmledit_views table tr th { background-color: #e5ecea; } .htmledit_views abbr[data-original-title], .htmledit_views abbr[title] { border-bottom-color: #a09a8e; } .marker { background-color: #f5f21f; } .htmledit_views kbd, .htmledit_views pre, .htmledit_views samp { color: #0d0d0d; } .htmledit_views a { color: #4ea0d7; text-decoration-color: initial; } .htmledit_views a:focus, .htmledit_views a:hover { color: #b81e24; } .htmledit_views a:visited { color: #6995b2; } .htmledit_views .flow-chart [fill=”#000”], .htmledit_views .flow-chart [fill=”#000000”], .htmledit_views .flow-chart [fill=”black”], .htmledit_views .sequence-diagram [fill=”#000”], .htmledit_views .sequence-diagram [fill=”#000000”], .htmledit_views .sequence-diagram [fill=”black”] { fill: #545455; } .htmledit_views .flow-chart [stroke=”#000000”], .htmledit_views .sequence-diagram [stroke=”#000000”] { stroke: #545455; } .htmledit_views .MathJax_SVG_Display { color: #545455; } .htmledit_views .prettyprint, .htmledit_views pre.prettyprint { background-color: #eaeef0; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views .prettyprint .pre-numbering { background-color: #e4e5e9; } .htmledit_views kbd { border-top-color: rgba(68, 70, 71, 0.25); border-right-color: rgba(68, 70, 71, 0.25); border-bottom-color: rgba(68, 70, 71, 0.25); border-left-color: rgba(68, 70, 71, 0.25); box-shadow: rgba(68, 70, 71, 0.25) 0px 1px 0px; background-color: #fdf6eb; color: #393a3d; } .htmledit_views code ol li div.hljs-ln-numbers { border-right-color: #cac3b5; .htmledit_views img.right { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views img.left { border-top-color: #d0c9bb; border-right-color: #d0c9bb; border-bottom-color: #d0c9bb; border-left-color: #d0c9bb; } .htmledit_views .marker {background-color: #f5f21f;} .htmledit_views figure > figcaption { color: #a09a8e; } .htmledit_views a > img { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; outline-color: #1f80b0; } .htmledit_views .code-featured { border-top-color: #e31513; border-right-color: #e31513; border-bottom-color: #e31513; border-left-color: #e31513; } .htmledit_views .math-featured { box-shadow: #b51312 0px 0px 2px; background-color: rgba(227, 21, 19, 0.05); } .htmledit_views .image-clean { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; background-image: initial; background-color: initial; } .htmledit_views .image-grayscale { background-color: #fdf6eb; color: #6b6a67; } .htmledit_views p { color: #545455; } .htmledit_views h1, .htmledit_views h2, .htmledit_views h3, .htmledit_views h4, .htmledit_views h5, .htmledit_views h6 { color: #545455; } .htmledit_views blockquote { border-left-color: #e3dbcd; background-image: initial; background-color: #e4e5e9; } .htmledit_views blockquote p { color: #545455; } .htmledit_views hr { border-top-color: initial; border-right-color: initial; border-left-color: initial; border-bottom-color: #d0c9bb; } .htmledit_views table tr { border-right-color: initial; border-bottom-color: initial; border-left-color: initial; border-top-color: #e0d8ca; background-color: #fdf6eb; } .htmledit_views tbody { border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views table tr:nth-child(2n) { background-color: #f5efe3; } .htmledit_views table tr td, .htmledit_views table tr th { border-top-color: #e0d8ca; border-right-color: #e0d8ca; border-bottom-color: #e0d8ca; border-left-color: #e0d8ca; color: #545455; } .htmledit_views table tr td p, .htmledit_views table tr th p { color: #545455; } .htmledit_views table tr th { background-color: #e5ecea; } .htmledit_views abbr[data-original-title], .htmledit_views abbr[title] { border-bottom-color: #a09a8e; } .marker { background-color: #f5f21f; } .htmledit_views kbd, .htmledit_views pre, .htmledit_views samp { color: #0d0d0d; } .htmledit_views a { color: #4ea0d7; text-decoration-color: initial; } .htmledit_views a:focus, .htmledit_views a:hover { color: #b81e24; } .htmledit_views a:visited { color: #6995b2; } .htmledit_views .flow-chart [fill=”#000”], .htmledit_views .flow-chart [fill=”#000000”], .htmledit_views .flow-chart [fill=”black”], .htmledit_views .sequence-diagram [fill=”#000”], .htmledit_views .sequence-diagram [fill=”#000000”], .htmledit_views .sequence-diagram [fill=”black”] { fill: #545455; } .htmledit_views .flow-chart [stroke=”#000000”], .htmledit_views .sequence-diagram [stroke=”#000000”] { stroke: #545455; } .htmledit_views .MathJax_SVG_Display { color: #545455; } .htmledit_views .prettyprint, .htmledit_views pre.prettyprint { background-color: #eaeef0; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: initial; } .htmledit_views .prettyprint .pre-numbering { background-color: #e4e5e9; } .htmledit_views kbd { border-top-color: rgba(68, 70, 71, 0.25); border-right-color: rgba(68, 70, 71, 0.25); border-bottom-color: rgba(68, 70, 71, 0.25); border-left-color: rgba(68, 70, 71, 0.25); box-shadow: rgba(68, 70, 71, 0.25) 0px 1px 0px; background-color: #fdf6eb; color: #393a3d; } .htmledit_views code ol li div.hljs-ln-numbers { border-right-color: #cac3b5;

        当程序需要创建一种新的文件格式,往往有这样一个需求:在文件列表显示的时候显示自己想要的图标,并且双击此文件就会使用指定的程序以指定的命令打开——就像 word,excel 那样。

        这种情况是通过注册表的设置来实现的,目前我还没了解实践指定程序打开,先说修改图标的方法。以下仅限描述修改位置,可以用不同语言程序通过不同方式编程实现。

        1. 在 HKEY_CLASSES_ROOT 分支上增加一个以 “.” 开头的扩展名的项,如 “.tzr”,设置一个值项:默认,REG_SZ,tzr_file。

        2. 在 HKEY_CLASSES_ROOT 分支上增加一个 “tzr_file” 项,增加新子项 “DefaultIcon”,设置:默认,REG_SZ,”c:\program files\tzrprogram\tzr.ico”

        是的,就这么简单!

            </div>

转载来源 https://blog.csdn.net/suppercoder/article/details/8307031

猜你喜欢

转载自blog.csdn.net/pangzi1821/article/details/81187499