Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to list the recent documents using API?
Message
De
25/03/2002 08:09:12
 
 
À
25/03/2002 06:13:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00636738
Message ID:
00636757
Vues:
16
>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!

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform