你如何注册一个最近使用的窗口,为Windows 7做准备?

时间:2023-01-18 18:18:20

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. Supposedly, if you've been 'properly' recording these most recently used items with the Windows registry, they'll automatically appear.

随着即将发布的Windows 7,新推出的功能之一是跳转列表,其自动填充的最近使用的项目。假设,如果您已经“正确”地记录了最近使用的与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. The paths just happen to be stored in the registry, and not in any particular place for the MRU list.

在注册表中。然而,这实际上并没有对windows进行注册。路径刚好存储在注册表中,而不是在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. In the talk, they discuss configuring the jump list via a COM interface. I'm going to take a look at the video now to see if it can apply to pre-windows 7 apps too. (Of course, if anyone knows any better, I'd love to hear it...)

更新2:看起来可能有一些关于如何在windows 7中使用akaDruid提供的链接的好信息。在讨论中,他们讨论通过COM接口配置跳转列表。我现在要看一下这个视频,看看它是否也适用于前windows 7应用程序。(当然,如果有人知道更好的话,我很乐意听到……)

Update 3: FOUND IT!!!

更新3:找到了! ! !

The video below lead me to a command - 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. Thus, your "Most Recently Used" list can be stored/populated any way you want, as long as you've called that function.

下面的视频把我带到了一个命令- SHAddToRecentDocs。跳转列表会自动填充您的应用程序添加到该列表中的文档。这段视频还涉及了其他一些内容,但AddToRecentDocuments是关键。因此,您的“最近使用的”列表可以以任何您想要的方式存储/填充,只要您调用了该函数。

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. Amazing...something elegant and relatively simple done my Microsoft! :)

更新4:进一步看视频,只要你的应用程序已经注册为一个文件类型的正确处理程序,shell就会为你通过调用SHAddToRecentDocs来填充一个自动跳转列表。神奇的……我的微软做了一件既优雅又相对简单的事情!:)

Update 5:

更新5:

Recently found an article detailing the process on the Windows 7 for Developers blog.

最近发现了一篇文章,详细介绍了Windows 7开发人员博客的过程。

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

1 个解决方案

#1


2  

The API you are looking for is the SHAddToRecentDocs method.

您正在寻找的API是SHAddToRecentDocs方法。

#1


2  

The API you are looking for is the SHAddToRecentDocs method.

您正在寻找的API是SHAddToRecentDocs方法。