>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.
>
Hi Malcolm,
The Bitmap Data is in DIB format:
if oDataObject.GetFormat( 2 )
lcData = oDataObject.GetData( CF_DIB )
? lcData
endif
HTH
Herman