Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLEDragDrop GetData() in BMP/WAV format?
Message
From
22/05/2005 21:33:57
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01016102
Message ID:
01016646
Views:
50
Hi Sergey,

>In case of a single value (CF_BITMAP, CF_WAVE, e.t.c), the value is returned by GetData method
>
>
>lhBitmap = oDataObject.GetData(2)
>...
>
That's exactly what I'm doing using VFP 9 running XP SP2 and lhBitMap gets a .F. value.

Here's how to reproduce if anyone is interested:

1. Set a control's OLEDropMode property to 1, then place the following in the control's OLEDragDrop event:
local lcData

* images: 2=bmp, 3=metafile, 8=dib, 14=enhanced metafile
if oDataObject.GetFormat( 2 )
  lcData = oDataObject.GetData( 2 )

  * always returns .F.
  wait window ".GetData( 2 ) = " + left( transform( lcData ), 8 )

  local laData[ 1 ]
  lcData = oDataObject.GetData( 2, @laData )

  * always returns .F.
  wait window ".GetData( 2, @laData ) = " + left( transform( lcData ), 8 )

  * always return .F.
  wait window ".GetData( 2, @laData ), laData[ 1 ] = " + left( transform( laData[ 1  ]), 8 )

  * always returns 1
  wait window "alen( laData, 1 ) = " + transform( alen( laData, 1 ) )

endif
2. Paste an image into Word, then click on it, wait a second or so for the cursor to indicate Word is in OLEDragDrop mode, then drag and drop image on VFP control configured as above.

What I'm getting in my environment (VFP 9, XP SP2) is just a bunch of .F. values.

Note: I have OLEDragDrop working great with text strings and files so I have the OLEDragDrop process working fine for simple things.

I'm hoping that I'm doing something wrong above and that there is in fact a way to retrieve binary BMP and WAV content from the oDataObject when such content is dropped on a VFP control.

Thanks again for your help, Sergey,

Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform