IE has a function which loads all the user's favorites under the favorites menu. I'm trying to add a similar menu-driven function to a program. I'd like to rip the code out of ie but I can't seem to find it. Has anyone any experience with this type of thing? --4oh4
The favorites are stored as normal files on the harddisk. First you have to find out where the favorites are stored. First, look under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders If you can read the string value "favorites", use that as the path. Otherwise, open HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders and use the favorites key from there. From there on, you will have to do a recursive directory scan. For each subdirectory, add a submenu. For each *.url file in the directory, add a menu entry. Perhaps you should add *all* files you find, since I've seen other files than .url files in a favorites list. Of course you should remove path and file extension of the filename before adding it to the list. When a user clicks a menu entry, shellexecute the filename you've added to the list. That should be it. I guess.