当desktop.ini更改时,如何立即重新加载文件夹图标
我一直在尝试使用更改文件夹上的desktop.ini 以编程方式更改文件夹图标。我能够设置图标,但无法通过更改“IconIndex”立即更改它。几秒钟后,图标也发生了变化。
有谁知道如何立即更改图标吗?
I've been trying to change folder icon programmatically using changing desktop.ini on the folder. I was able to set an icon, but couldn't change it immediately through changing "IconIndex". The icon was also changed in a few seconds later.
Is there anybody know how to change the icon immediately?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
例子:
Example:
以下过程对我来说效果很好(在 Windows 7 上):
记住包含Shlobj.h
The following procedure works well for me (on Windows 7):
Remember to include Shlobj.h
我之前已经通过评论回复我的问题来回答过。为了方便大家,我再写一个答案。
如果要使用 Desktop.ini 对任何文件夹的外观进行任何更改,请使用一些 win32 shell 函数。您不应尝试直接编辑 Desktop.ini。它不会对任何文件夹的外观进行任何更改。
您可以通过以下链接获取有关 win32 shell 函数的更多信息。
http://msdn.microsoft。 com/en-us/library/windows/desktop/bb776426(v=vs.85).aspx
I already answered by commenting a reply at my question before. For more convenience, I will write an answer again.
If you want to make any change at an appearance of any folder using Desktop.ini, use some of win32 shell functions. You shouldn't try to edit a Desktop.ini directly. It doesn't get to make any change at an appearance of any folder.
You could get more information of win32 shell functions through the following link.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776426(v=vs.85).aspx