OLEDragDrop custom format 
Author Message
 OLEDragDrop custom format

From what I've read, clipboard formats are supposed to coincide with dragdrop
formats. I can enumerate clipboard formats and find two that have been
registered. But the two I found registered do not work with dragdrop. To find
what works with dragdrop I must test everything from -32768 to 32767 and use
what's found. Enumerating clipboard formats returns long values which must be
converted to integers ranging from -32768 to 32767. Using the converted
values works with clipboard.getformat(x). They do not however work with
data.getformat(x), with data supplied by the OLEDragDrop event.

I'm trying to drag attachments from GroupWise 6.5 into an Access 97
application. Because Access 97 does not have that functionality I must use an
ActiveX. I'm able to discover the dragdrop formats by iterating when the
application loads and use what's found. I was able to figure out what's in
the byte arrays returned using the two formats, and the application works.
But I'd like to find a better way to discover the dragdrop formats instead of
iterating through all possibilities.

The application is still in Access 97 because no project has been approved
for new development and only what the users have installed can be used. Thanks



Mon, 31 Oct 2011 03:51:26 GMT  
 OLEDragDrop custom format

Quote:

> From what I've read, clipboard formats are supposed to coincide with dragdrop
> formats.

I've never ran into that correlation before, but that certainly doesn't mean it
isn't so.

Quote:
> I can enumerate clipboard formats and find two that have been
> registered. But the two I found registered do not work with dragdrop. To find
> what works with dragdrop I must test everything from -32768 to 32767 and use
> what's found.

Clipboard formats, and lots of other things, exist in a string table with indices
between &hC000& and &hFFFF&.  If you loop that range, using GetClipboardFormatName,
you'll see lots of interesting stuff.

   http://vb.mvps.org/articles/qa200203.asp

Quote:
> Enumerating clipboard formats returns long values which must be
> converted to integers ranging from -32768 to 32767. Using the converted
> values works with clipboard.getformat(x). They do not however work with
> data.getformat(x), with data supplied by the OLEDragDrop event.

Unfortunately, the rest of this I really know nothing about.  Just wanted to inject
the range I was familiar with.

Good luck...
--
.NET: It's About Trust!
 http://vfred.mvps.org



Mon, 31 Oct 2011 07:09:40 GMT  
 OLEDragDrop custom format



| > From what I've read, clipboard formats are supposed to coincide with
dragdrop
| > formats.
|
| Clipboard formats, and lots of other things, exist in a string table with
indices
| between &hC000& and &hFFFF&.  If you loop that range, using
GetClipboardFormatName,
| you'll see lots of interesting stuff.

Indeed.  BadApplicationNotificationClassWindow has me thinking unhappy
things.

--
2025
If you do not believe in time travel,
your beliefs are about to be tempered.

http://www.facebook.com/group.php?gid=43606237254



Mon, 31 Oct 2011 07:48:49 GMT  
 OLEDragDrop custom format

Quote:


> > From what I've read, clipboard formats are supposed to coincide with dragdrop
> > formats.

> I've never ran into that correlation before, but that certainly doesn't mean it
> isn't so.

> > I can enumerate clipboard formats and find two that have been
> > registered. But the two I found registered do not work with dragdrop. To find
> > what works with dragdrop I must test everything from -32768 to 32767 and use
> > what's found.

> Clipboard formats, and lots of other things, exist in a string table with indices
> between &hC000& and &hFFFF&.  If you loop that range, using GetClipboardFormatName,
> you'll see lots of interesting stuff.

>    http://vb.mvps.org/articles/qa200203.asp

> > Enumerating clipboard formats returns long values which must be
> > converted to integers ranging from -32768 to 32767. Using the converted
> > values works with clipboard.getformat(x). They do not however work with
> > data.getformat(x), with data supplied by the OLEDragDrop event.

> Unfortunately, the rest of this I really know nothing about.  Just wanted to inject
> the range I was familiar with.

Thanks Karl. I can get a byte array from the OLEDragDrop data object, for a
GroupWise attachment, if I happen to know what format value to use. This is
not published anywhere. Documentation at the Novell site doesn't mention it.
I can't find anything through internet searches. There are two possible
values that return different information, both of which I need. I can find
the values by looping through data.GetFormat or data.GetData with all
possible integer values. When I find them I can then use them and they work.
Unforunately, each time the machine boots these values change.

When the application loads I could start a background process to do the
testing and find the values, but that won't work because someone must drag an
email attachment and drop into the application at least one time to get a
data object. Of course, once I have looped and discovered the values one time
I can continue using them, so the first drag and drop will always have a big
delay.

Attachments can be dragged from GroupWise and dropped into Windows Explorer,
or an open folder, with no problem. How does Windows know how to handle the
drop event? The GetData method does not return a file but a formatted packet.

What process does GroupWise go through to register this functionality?
Surely there's a way to look this up. Also, there should be an API available
providing the same functionality as Explorer, when an attachment is dropped
into an open folder window.

I'm surprized it's so difficult to find documentation or examples for this.
Novell went a long way to facilitate VB, providing many DLLs and coding
examples.



Mon, 31 Oct 2011 21:58:02 GMT  
 OLEDragDrop custom format

Quote:

> What process does GroupWise go through to register this functionality?
> Surely there's a way to look this up. Also, there should be an API available
> providing the same functionality as Explorer, when an attachment is dropped
> into an open folder window.

> I'm surprized it's so difficult to find documentation or examples for this.
> Novell went a long way to facilitate VB, providing many DLLs and coding
> examples.

Ugh.  Well, I worked with Edanmo once, to accept OLEDragDrops from Outlook and OE.
Or, more accurately, he provided a method for it, for which I have virtually no
recollection how "we" did it.  I /think/ there's an example on his web page, though.
Have you looked there?  I'd have to guess that GroupWise would be, at least
surficially, similar?
--
.NET: It's About Trust!
 http://vfred.mvps.org


Tue, 01 Nov 2011 02:50:36 GMT  
 OLEDragDrop custom format

Quote:


> > What process does GroupWise go through to register this functionality?
> > Surely there's a way to look this up. Also, there should be an API available
> > providing the same functionality as Explorer, when an attachment is dropped
> > into an open folder window.

> > I'm surprized it's so difficult to find documentation or examples for this.
> > Novell went a long way to facilitate VB, providing many DLLs and coding
> > examples.

> Ugh.  Well, I worked with Edanmo once, to accept OLEDragDrops from Outlook and OE.
> Or, more accurately, he provided a method for it, for which I have virtually no
> recollection how "we" did it.  I /think/ there's an example on his web page, though.
> Have you looked there?  I'd have to guess that GroupWise would be, at least
> surficially, similar?

I have two solutions going. I wrote a list of string values found with
GetClipboardFormatName going from 0 to 65535. Values were only returned above
&hc000. Converting those to integers in the range -32768 to 32767, which must
be used with data.GetFormat and data.GetData, I found text strings associated
with values that were found to work. It takes almost no time to scan value
string pairs in the range and find the two spellings I need. Plugging those
into data.GetFormat and data.GetData works perfectly. However, scanning for
the strings must be done after the file is dropped otherwise both will not be
there. Once scanned, the values can be reused over and over. Thank you for
saying I can use GetClipboardFormatName to read through that string space.

The second solution might be better. Edanmo has a hack that converts the
data object provided by the OLEDragDrop method, into an IDataObject object.
From what I've read I should be able to make that work. Unfortunately I can't
find what reference (dll, library, etc) to add to the project that has the
IDataObject interface. Do you know what that is? Thanks again.



Tue, 01 Nov 2011 04:04:10 GMT  
 OLEDragDrop custom format

Quote:

> there. Once scanned, the values can be reused over and over. Thank you for
> saying I can use GetClipboardFormatName to read through that string space.

Cool.

Quote:
> The second solution might be better. Edanmo has a hack that converts the
> data object provided by the OLEDragDrop method, into an IDataObject object.
> From what I've read I should be able to make that work. Unfortunately I can't
> find what reference (dll, library, etc) to add to the project that has the
> IDataObject interface. Do you know what that is? Thanks again.

That's in his olelib.tlb
--
.NET: It's About Trust!
 http://vfred.mvps.org


Tue, 01 Nov 2011 04:21:03 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Autonumber Custom Format

2. Binding Custom POSSIBLE VALUES to Field Format

3. Help needed: Generating table from styles/inserting objects with custom formatting

4. create custom icon,custom combobox in custom toolbar

5. create custom icon,custom combobox(to insert values)in custom toolbar

6. Export Word document to custom format

7. Custom formatting headers and footers

8. Does anyone the DataBinder.Eval....Custom Format options?

9. custom time format in dtpicker

10. Custom clipboard formats

11. Custom File Format - Some advice required.

12. Custom Clipboard Format

 

 
Powered by phpBB® Forum Software