Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to list the recent documents using API?
Message
From
25/03/2002 08:09:12
 
 
To
25/03/2002 06:13:32
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00636738
Message ID:
00636757
Views:
17
>Desenvolvedor de sistema em VFP
>how to list the recent documents using API????

Check registry
key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
value: Recent
for the location of the Recent documents folder.
After that use the SYS(2000) function to retrieve list of shortcuts.
* Retrieve lcRecentFoldrPath from registry
* ....

* Display contents of recent documents folder
lcRecentFile = SYS(2000, ADDBS(lcRecentFoldrPath)+'*.*')
?lcRecentFile
Do While !empty(lcRecentFile)
   lcRecentFile = SYS(2000, ADDBS(lcRecentFoldrPath)+'*.*', 1)
   ?lcRecentFile
EndDo
Instead of using the registry you may utilize the CSIDL functions (SHGetSpecialFolderPath, SHGetSpecialFolderLocation, SHGetFolderPath, SHGetFolderLocation), but they are Shell32.dll specific (depend on version of windows and version of IE, so on old OSs w/t old browsers they may not be accessible). Also for SHGetSpecialFolderLocation or SHGetFolderLocation (most recent - since Windows 2000) you will need some structures to call them from VFP. So that you will need to make structures like string and probably will need Struct or ClsHeap

HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Reply
Map
View

Click here to load this message in the networking platform