Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 24 Mar 2008 22:25:12 +0100,    group: microsoft.public.platformsdk.shell        back       


How-to Drag and drop a ShellLink   
Hello,


I would like to allow my users to drag-n-drop items from our ListView to 
their desktop as a ShellLink (referencing file system objects, not URLs).


I have successfully saved an IShellLink in an IStream, and also packed it 
into STGMEDIUM etc.
The desktop successfully creates the shell link file, but it will just 
contain some garbage data (and the shell will not identify the shell link).


Are there any markers / signatures for identifying the ShellLink-file?

Any recommendations / hints how to hand over a IShellLink to the shell?


Thanks in advance
Andreas Nilsson
date: Mon, 24 Mar 2008 22:25:12 +0100   author:   Andreas Nilsson

Re: How-to Drag and drop a ShellLink   
Andreas Nilsson wrote:
> I would like to allow my users to drag-n-drop items from our ListView
> to their desktop as a ShellLink (referencing file system objects, not
> URLs). 

I think you just need to create a data object representing the target item (the easiest way is to obtain a shell data object from IShellFolder::GetUIObjectOf) and pass it to DoDragDrop along with DROPEFFECT_LINK.

-- 
Jim Barry, Microsoft MVP
date: Tue, 25 Mar 2008 13:45:14 -0000   author:   Jim Barry

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us