| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, everyone. I have a problem to create a tool to read file path dragged on my form! I receive a WinDragDropSession object from drag/drop event after create WinDragDropObject object after obtain a IDataObject object. If I try to see available formats from WinDragDropObject I cant see 'CF_HDROP' only Set('FileName' 'DragContext' 'InShellDragLoop' 'Shell IDList Array' 'Shell Object Offsets' 'DragImageBits' 'FileNameW' ) whose contain a OLE interface. Can you help me to solve my problem? A lot of thanks for your attention to my problem |
|
#2
| |||
| |||
| > Can you help me to solve my problem? The following blog post might help: http://readthesourceluke.blogspot.co...ia-native.html CU, Udo |
|
#3
| |||
| |||
| Thanks for answer, but it my mistake I using a Digitalk Release 3.1 When I try to see a Objects that Clipboard contain it show me a nil ![]() Here a my code: dragTargetDrop: aSession | dragObject iDataObject formatEtc cfFormat stgMedium iStream | dragObject := aSession objects first. iDataObject := dragObject formats at: 'FileNameW' ifAbsent: [nil]. iDataObject notNil ifTrue: [ iDataObject canCreateLinkedObject ifTrue: [ cfFormat := Clipboard registerFormat: 'FileNameW'. formatEtc := OLE_FORMATETC format: cfFormat medium: 1. (iDataObject hasGetDataFormat: formatEtc) ifTrue: [ formatEtc lindex. 0. stgMedium := iDataObject getData: formatEtc. ] ] ] Maybe some thing wrong with a code ![]() |
|
#4
| |||
| |||
| On Aug 15, 2:45*pm, "vsedlets...@gmail.com" <vsedlets...@gmail.com> wrote: > Thanks for answer, but it my mistake I using a Digitalk Release 3.1 > Maybe some thing wrong with a code ![]() Actually, if you are using Digitalk Smalltalk 3.1 then you are posting to the wrong newsgroup. This newsgroup is for Dolphin Smalltalk. Questions for Digitalk should be posted to the more general comp.lang.smalltalk and/or to the mailing list dedicated to Digitalk. Go to http://www.listserv.dfn.de/cgi-bin/wa?SUBED1=vswe-l&A=1 to subscribe to that mailing list and/or view the archives. James Foster |
|
#5
| |||
| |||
| > I receive a WinDragDropSession object from drag/drop event after > create WinDragDropObject object after obtain a IDataObject object. > If I try to see available formats from WinDragDropObject I cant see > 'CF_HDROP' only Set('FileName' 'DragContext' 'InShellDragLoop' 'Shell > IDList Array' 'Shell Object Offsets' 'DragImageBits' 'FileNameW' ) > whose contain a OLE interface. I think I got you wrong. AFAIK you won't get the file contents via DnD from Explorer - only the filename. The filename(s) are available as format 'Filename' and you are responsible for reading it on your own. So in VSE Pseudocode ... : dragTargetDrop: aSession | dragObject filename stream contents | dragObject := aSession objects first. filename := dragObject formats at: 'FileNameW' ifAbsent: [nil]. stream := FileStream open: filename. [contents := stream contents] ensure: [stream close]. "Do whatever you want with the filenames and/or content" ... CU, Udo |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.