Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add recent items to my program's jump list on the Windows 7 taskbar?

I'm using Delphi XE and would like to add "recent items" in the Windows 7 taskbar jump list for my application, like when right-clicking on Microsoft Word brings up recently opened documents. I've found information on how to set the progress but nothing on jump-list items. Any help would be greatly appreciated.

like image 752
jonjbar Avatar asked Dec 16 '22 14:12

jonjbar


1 Answers

This will happen automatically if, for instance, you only use the standard Windows file dialogs. At least my text editor, Rejbrand Text Editor, has got such a MRU list by Windows. It lists all files I have recently edited using Rejbrand Text Editor, even though I have not written any code at all for it.

Windows 7 jump list

I think that Windows observes the files you

  • open and save in your application by means of standard Windows file dialogs
  • open in your application by starting yourapp.exe <file name>, for instance by double-clicking a file that opens in your application

and automatically display these in the list.

If you want to control the task bar button and menu programmatically, you can use the Windows API. Delphi-specific examples are found in this blog post.

like image 172
Andreas Rejbrand Avatar answered Dec 28 '22 07:12

Andreas Rejbrand