Explorer Shortcuts
Mike -- MREAMS@cerner.com Tuesday, November 26, 1996 Environment: VC++ 4.0, Win95 Can anyone point me to some sample code for resolving and creating MS-Explorer shortcuts. We are looking to store these in a database (attach them to a record). What I need is a means of converting them to a storable format and then converting them back to a usable shortcut. I have found the IShellLink and IUnknown help files, but have been unable to decode any of the documentation. I have also found the Filecore.cpp file with the AfxResolveShortcut API but that code seems to be for a very specific case. Any samples, suggestions welcome! Michael P. Reams (Mike) Cerner Corporation 2900 Rockcreek Parkway Kansas City, MO 64117-2551 (816) 472-1024 Ext. 2138 (816) 221-1024 Fax mreams@cerner.com http://www.cerner.com "To Automate the Process of Managing Health"
Rob Warner -- rhwarner@southeast.net Wednesday, November 27, 1996 > Environment: VC++ 4.0, Win95 > > Can anyone point me to some sample code for resolving and creating > MS-Explorer shortcuts. We are looking to store these in a database > (attach them to a record). What I need is a means of converting them > to a storable format and then converting them back to a usable > shortcut. I have found the IShellLink and IUnknown help files, but > have been unable to decode any of the documentation. I have also > found the Filecore.cpp file with the AfxResolveShortcut API but that > code seems to be for a very specific case. > > Any samples, suggestions welcome! > > Michael P. Reams (Mike) > Cerner Corporation > 2900 Rockcreek Parkway > Kansas City, MO 64117-2551 > (816) 472-1024 Ext. 2138 > (816) 221-1024 Fax > mreams@cerner.com > http://www.cerner.com "To Automate the Process of Managing Health" > If you go to the download area of my page (URL below), I have written a class called CShortcut that encapsulates shortcuts. You can either use the class or sabotage the code to your heart's content :) Rob Warner rhwarner@southeast.net http://users.southeast.net/~rhwarner
Dong Chen -- d_chen@ix.netcom.com Wednesday, November 27, 1996 At 11:07 AM 11/26/96 -0600, you wrote: >Environment: VC++ 4.0, Win95 > >Can anyone point me to some sample code for resolving and creating >MS-Explorer shortcuts. We are looking to store these in a database >(attach them to a record). What I need is a means of converting them >to a storable format and then converting them back to a usable >shortcut. I have found the IShellLink and IUnknown help files, but >have been unable to decode any of the documentation. I have also >found the Filecore.cpp file with the AfxResolveShortcut API but that >code seems to be for a very specific case. > >Any samples, suggestions welcome! > >Michael P. Reams (Mike) >Cerner Corporation >2900 Rockcreek Parkway >Kansas City, MO 64117-2551 >(816) 472-1024 Ext. 2138 >(816) 221-1024 Fax >mreams@cerner.com >http://www.cerner.com "To Automate the Process of Managing Health" > > > Take a look at Programming Windows 95 User Interface by Nancy Cluts. Microsoft Press. This book is also included in the MSDN CD. There is a chapter about creating and resolving shortcuts along with sample code. To create a shortcut, you need to first create an IShellLink object and get the pointer to the interface. Then query it to get an IPersistFile interface and use it to set the target path to the shortcut and the working directory by using the SetPath() and SetWorkingDirectory() functions respectively. You also need to use IShellLink and IPersistFile to resolve the shortcut (meaning: to find the target). The functions you need is Resolve(), GetPath() and GetArguments() etc. See help on IShellLink for details of these functions. In your case, I think you can just store the target path in your database and create the link when you need it. Hope this help.
Shiva Shenoy -- shiva@wallop.com Wednesday, November 27, 1996 Query for "Creating a Shortcut to a File" in the title under Developer Studio Help Search. Also search for "Resolving a Shortcut" That might help you. Look under SDKs - Win32 SDK - Win32 Prog Reference - Overviews - Shell Features and Extension - Shell Links- Using ShellLinks. -shiva >---------- > >Environment: VC++ 4.0, Win95 > >Can anyone point me to some sample code for resolving and creating >MS-Explorer shortcuts. We are looking to store these in a database >(attach them to a record). What I need is a means of converting them >to a storable format and then converting them back to a usable >shortcut. I have found the IShellLink and IUnknown help files, but >have been unable to decode any of the documentation. I have also >found the Filecore.cpp file with the AfxResolveShortcut API but that >code seems to be for a very specific case. > >
mzsong@aztech.com.sg Thursday, November 28, 1996 Hi, I'd found some in msdn, but forget where.Maybe in July/96's. If you find it, please let me know, thanks. James 11/28/96 >---------- >From: Reams,Mike[SMTP:MREAMS@cerner.com] >Sent: Tuesday, November 26, 1996 9:07 AM >To: 'MFC LIST' >Subject: Explorer Shortcuts > >Environment: VC++ 4.0, Win95 > >Can anyone point me to some sample code for resolving and creating >MS-Explorer shortcuts. We are looking to store these in a database >(attach them to a record). What I need is a means of converting them >to a storable format and then converting them back to a usable >shortcut. I have found the IShellLink and IUnknown help files, but >have been unable to decode any of the documentation. I have also >found the Filecore.cpp file with the AfxResolveShortcut API but that >code seems to be for a very specific case. > >Any samples, suggestions welcome! > >Michael P. Reams (Mike) >Cerner Corporation >2900 Rockcreek Parkway >Kansas City, MO 64117-2551 >(816) 472-1024 Ext. 2138 >(816) 221-1024 Fax >mreams@cerner.com >http://www.cerner.com "To Automate the Process of Managing Health" > >
| Вернуться в корень Архива |