设为首页 加入收藏

TOP

Creating Icon Overlay Handlers / 创建图标标记 Handlers (续) / VC++, Windows, DLL, ATL, COM(二)
2017-10-11 18:11:11 】 浏览:9709
Tags:Creating Icon Overlay Handlers 创建 图标 标记 Windows DLL ATL COM
43 } MyOverlay.cpp

7、在 .rgs 文件中添加注册表信息,确保各 GUID 与 .idl 文件中的一致。

 1 HKCR  2 {  3  NoRemove CLSID  4  {  5         ForceRemove {29913677-1662-46C5-8645-16F84DA6F438} = s 'MyOverlay Class'
 6  {  7  ForceRemove Programmable  8             InprocServer32 = s '%MODULE%'
 9  { 10                 val ThreadingModel = s 'Apartment'
11  } 12             TypeLib = s '{942F4DBB-4667-4767-A35B-52F32F623C63}'
13             Version = s '1.0'
14  } 15  } 16 } 17 
18 HKLM 19 { 20  NoRemove SOFTWARE 21  { 22  NoRemove Microsoft 23  { 24  NoRemove Windows 25  { 26  NoRemove CurrentVersion 27  { 28  NoRemove Explorer 29  { 30  NoRemove ShellIconOverlayIdentifiers 31  { 32                             ForceRemove ' MyOverlay' = s '{29913677-1662-46C5-8645-16F84DA6F438}'
33  { 34  } 35  } 36  } 37  } 38  } 39  } 40  } 41 }

8、Build Project 后通过 cmd.exe 注册或解注册生成的 .dll 文件。重启 explorer.exe 后生效。

9、由于 slots 数量有限,检查在注册表中添加的子项是否在有效范围内(目前为前15个)。按下Win+R键,通过运行对话框打开regedit.exe,按HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers的顺序依次展开或直接Ctrl+F查找到MyOverlay项。可采用在.rgs文件中的子项名称前添加空格的方式将其位置提前。

10、查看效果如下图所示。

 

参考网址:http://www.codeproject.com/Articles/7484/How-to-overlay-an-icon-over-existing-shell-objects

—————————————————————————————————————

本文为本人原创,如需转载请注明出处。

http://www.cnblogs.com/lantingji/p/5853790.html 

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇批处理安装Windows服务,提示&quo.. 下一篇java利用poi读取excel异常问题

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目