[英]How do you register a Most Recently Used list with Windows in preparation for Windows 7?
With the upcoming release of Windows 7, one of the newly touted features is the Jump Lists, with their automatic population of most recently used items. 随着即将发布的Windows 7,新推出的功能之一是跳转列表,其中包含最近使用的项目的自动填充。 Supposedly, if you've been 'properly' recording these most recently used items with the Windows registry, they'll automatically appear. 据说,如果您使用Windows注册表“正确”记录这些最近使用的项目,它们将自动出现。
So, where in the registry do they actually need to be registered? 那么,在注册表中它们实际上需要注册吗? Is there even a standard place? 还有标准的地方吗?
I've done some more research, and I still can't find anything on this. 我做了更多的研究,但我仍然找不到任何相关的东西。 Seems like a nifty feature, if it was actually available... 看起来像一个漂亮的功能,如果它实际可用...
Update: The code project posted below has some interesting points to it; 更新:下面发布的代码项目有一些有趣的点; looking at the code, it plans to write the entries to 看着代码,它计划将条目写入
HKEY_CURRENT_USER\Software\MyCompany\MyProgram\MRU Registry entry
in the registry. 在注册表中。 However, this doesn't actually do the registration with windows. 但是,这实际上并没有对Windows进行注册。 The paths just happen to be stored in the registry, and not in any particular place for the MRU list. 该路径恰好是存储在注册表中,而不是在为MRU列表中的任何特别的地方。
Update 2: It looks like there might be some good information about how to do it in windows 7 with the link provided in the post by akaDruid . 更新2:看起来可能有一些关于如何在Windows 7中使用由akaDruid发布的链接提供的链接的良好信息。 In the talk, they discuss configuring the jump list via a COM interface. 在演讲中,他们讨论了通过COM接口配置跳转列表。 I'm going to take a look at the video now to see if it can apply to pre-windows 7 apps too. 我现在要看一下视频,看它是否也适用于Windows 7以前的应用程序。 (Of course, if anyone knows any better, I'd love to hear it...) (当然,如果有人知道更好,我很乐意听到......)
Update 3: FOUND IT!!! 更新3:发现它!
The video below lead me to a command - SHAddToRecentDocs. 下面的视频向我介绍了一个命令 - SHAddToRecentDocs。 The jump list is automatically populated with documents that your app adds to that list. 跳转列表会自动填充应用添加到该列表的文档。 The video goes over some other stuff too, but AddToRecentDocuments is the key. 该视频也涉及其他一些内容,但AddToRecentDocuments是关键。 Thus, your "Most Recently Used" list can be stored/populated any way you want, as long as you've called that function. 因此,只要您调用该函数,就可以以任何方式存储/填充“最近使用的”列表。
Update 4: Watching further into the video, it looks like as long as your app has registered itself as the correct handler of a file type, the shell will populate an automatic jump list for you by calling the SHAddToRecentDocs for you. 更新4:进一步观察视频,看起来只要您的应用程序已将自身注册为文件类型的正确处理程序,shell将通过为您调用SHAddToRecentDocs为您填充自动跳转列表。 Amazing...something elegant and relatively simple done my Microsoft! 太棒了......我的微软做了一些优雅而相对简单的事! :) :)
Update 5: 更新5:
Recently found an article detailing the process on the Windows 7 for Developers blog. 最近在Windows 7 for Developers博客上发现了一篇详细介绍该过程的文章。
http://blogs.msdn.com/yochay/archive/2009/01/06/windows-7-taskbar-part-1-the-basics.aspx http://blogs.msdn.com/yochay/archive/2009/01/06/windows-7-taskbar-part-1-the-basics.aspx
您正在寻找的API是SHAddToRecentDocs方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.