Print Page | Close Window

Getting IDataObject interface from DataObject?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13003
Printed Date: 10 November 2024 at 4:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Getting IDataObject interface from DataObject?
Posted By: DaveH
Subject: Getting IDataObject interface from DataObject?
Date Posted: 22 December 2008 at 11:10pm
In VB6, the event signature for the XtremeSuiteControls' OLEDragDrop event is something like:

Private Sub ListView1_OLEDragDrop(ByVal Data As XtremeSuiteControls.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)

The XtremeSuiteControls.DataObject looks the same as the standard VBRun.DataObject—unfortunately, that interface is rather limited compared to the OLE IDataObject interface. Specifically, it's not possible to specify the FORMATETC.lindex parameter that's needed to handle drag and drop of files from the shell (FileGroupDescriptor and FileContents).

As mentioned in http://www.mvps.org/emorcillo/en/code/vb6/getidataobject.shtml - http://www.mvps.org/emorcillo/en/code/vb6/getidataobject.shtml , there's a hack to get an IDataObject from a VBRun.DataObject, and no hack is needed to get one from the VB Common Controls (e.g., MSComctlLib.ListView)—MSComctlLib.DataObject implements the IDataObject interface, so you can simply assign it to an IDataObject variable. Is there some way to do the same for XtremeSuiteControls.DataObject? Assigning it to an IDataObject variable gives a Type mismatch error, and the hack that works for VBRun.DataObject crashes the app (not surprising).

-------------
SuitePro version 16.3.1

David Huang
Alterity, Inc.

http://www.acctivate.com" rel="nofollow - Inventory and Distribution Management for QuickBooks



Replies:
Posted By: Oleg
Date Posted: 23 December 2008 at 2:02am
Hi,
Thanks, we will add support of IDataObject cast too.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jpcoffeyXXX
Date Posted: 15 March 2009 at 4:41pm

"Thanks, we will add support of IDataObject cast too."


Oleg, David Huang's suggestion is quite valuable as I have been looking for this functionality as well.  Were you able to get this completed for CodeJock Suite Pro 2009?  Thank you for your feedback.

Sincerely,

John P. Coffey



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net