ole drag&drop of file from an activex/ treeview headache 
Author Message
 ole drag&drop of file from an activex/ treeview headache

Hello,
we have an ActiveX control which contains a treeview that displays
files. We want to let users drag those files and drop them in an
application (SolidWorks) that would open them as from any Windows
Explorer window.
We implemented this code:

Private Sub TreeView1_OLESetData(Data As ComctlLib.DataObject,
DataFormat As Integer)
  Data.Files.Add App.Path & "\Cylindre.SLDPRT", 1
End Sub
Private Sub TreeView1_OLEStartDrag(Data As ComctlLib.DataObject,
AllowedEffects As Long)
    Data.SetData , vbCFFiles
    AllowedEffects = vbDropEffectCopy
End Sub

Everything works fine then the ActiveX is run as a separate
application. When we integrate the ActiveX as a SolidWorks add-in, a
crash occurs when the cursor crosses the activex border.

First we supsected a problem with SolidWorks (you know, when there is
a bug it's always someone else's fault..) But then we replaced our
control with FileViewX from www.mabry.com and it worked... Even
stranger : if we include both our (standard) treeview and the
FileViewX control in our ActiveX, drag&drop from our control works
after a successful drag&drop from FileViewX.

So I guess we have to do something to initilialize our control
properly for OLE drag&drop, but what ?

Philippe Guglielmetti
www.DynaBits.com - mechanical design automation software



Fri, 20 May 2005 20:33:44 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. OLE Drag&Dropping Files

2. Treeview and OLE Drag -n- Drop problem

3. OLE Drag and Drop between two treeviews

4. OLE Drag drop from treeview to listview

5. ActiveX TreeView control not allowing drag drop

6. ActiveX TreeView Drag 'n Drop

7. ActiveX TreeView Drag 'n Drop

8. Drag-n-Drop for TreeView ActiveX

9. ActiveX TreeView control not allowing drag drop

10. Drag & Drop with TreeView control

11. TreeView Drag & Drop

12. TreeView + ListView +Drag&Drop

 

 
Powered by phpBB® Forum Software