在WINDOWS中,怎么在“我的电脑”或是桌面加入自己的图标?用COM做SHELL组件可以实现,这个我知道,但具体有没有这样的实例?因为我不要求有多复杂,只要求这个图标能响应右键,和双击就行了。以前看到过这样的源码,当时也没在意,现在忽然要找,怎么也找不到了。所以请各位帮帮忙,知道原理的说个方法。有源码的也请不要吝惜,请赐源码,我将感激不尽!邮箱:[email protected]
我发的贴子一向都是在5天之内结贴,而且按质量的高低给分,如果真能有对我有帮助的回复,再开一贴另外给分。
我发的贴子一向都是在5天之内结贴,而且按质量的高低给分,如果真能有对我有帮助的回复,再开一贴另外给分。
解决方案 »
- 看一份远控的源代码很费劲怎么办?
- 新手问题:在工程里增加一个类
- 我出差到深圳,我能否在深圳用电脑远程登录到我郑州办公室的机器(我办公室的机器有ip地址,我的机器在单位的局域网内,网管也有一个ip地址)。
- 如此创建的连接,怎么监听啊? (有点难度) 急!!!!!谢谢了!,没有分了.
- 无模式对话框的一个问题
- 那位老大有big5 to gbk的类,或者相关资料及其他编码相互转换的类或资料?
- 为什么用CWnd::CreateControl在视图中创建的控件子窗体不能显示?
- 简单的指针问题!烦劳指教
- 请教一问题。出自《深入浅出MFC》
- 如何用RichTextBox 打开一个文件.
- 关于对话框中使用RichEdit控件的问题。
- 图标问题
就是在这些位置加入一个项目,这绝对不是快捷方式。是一些SHELL组件对应的应该有一个COM的DLL文件
就是图中“其它”组是两个项目,这样不知道我说明白了没有,不是快捷方式。用MSDN的说法这东西好像是叫Namespace,但那上面的我怎么也没有看明白,实在不知道要怎么实现这样的功能。所以,请大家指教一下,有什么办法可以实现??
Navigate to HKEY_CLASSES_ROOT\CLSID\. Then right click and create a new key with value as {FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Now set the default value of this key to the folder name you want to use. Now your path will look like ( I will call this as parent key throughout the discussion) HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Step 2: Add Custom Icon to the folder--------------------------------------------------------------------------------Now create a sub key under parent key.
Name it as “DefaultIcon”.
Set the default value of this to the path of the icon image you want to use.
If you dont specify your icon, system will take default icon.Step 3: Adding attributes--------------------------------------------------------------------------------Under parent key create another key with name as “InprocServer32″
Set the default value as “shell32.dll”
Again at the same level create another folder as “ThreadingModel” and set its value as “Apartment”
Same way create another key (under parent level) at the same level with structure as \Shell\My Folder\Command
Set the default value here as “explorer /root,c:\Blog Data”
This has to be same which you gave when you created the first key.Step 4 Adding Handlers--------------------------------------------------------------------------------Under parent key, create another key as \ShellEx\PropertySheetHandlers\ {FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Similar way another key is to added to parent key as “Shell Folder”
In this right click and create new binary value called as “Attributes” with value as 00 00 00 00.Step 5: Settings to place in My Computer--------------------------------------------------------------------------------Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
Then to \CurrentVersion\Explorer\MyComputer\NameSpace\
Add the parent key which in this case is {FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
看下是不是你需要的,
google下IShellFolder.