天天看點

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