Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLEDragDrop GetData() in BMP/WAV format?
Message
From
23/05/2005 13:34:14
 
 
To
23/05/2005 12:36:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01016102
Message ID:
01016834
Views:
46
>Hi Herman,
>
>>The Bitmap Data is in DIB format:
>>
>#define CF_DIB 8
>>if oDataObject.GetFormat( 2 )
>>  lcData = oDataObject.GetData( CF_DIB )
>>  ? lcData
>>endif
>>
>
>Awesome! Thank you! You made my day! :)
>
>I was so close, yet obviously so far. I would have never figured out that the format I use in recognizing data via .GetFormat() might be different than the format that I would use to retrieve the data via .GetData(). Your solution opens up a lot of other doors for me as well (light bulb turning on over my head).
>
>Any suggestions on how I might convert that chuck of DIB data I get to a BMP? I'm going to see what's available in VFP 9's new GDI+ class and then go over to News2News.com.
>
>Again, thank you very much for your help!
>


Hi Malcolm, you're welcome :)

I don't think you can save the DIB format then display it in image viewer. You have to add the BITMAPFILEHEADER in front of the data, then you can save it into BMP file.

Take a look at the second example here:
Storing an image
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_7zfp.asp

Regards
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform