Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert DIB data stream to DIB handle
Message
From
24/05/2005 13:20:45
 
 
To
24/05/2005 01:14:28
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01016972
Message ID:
01017155
Views:
21
>Using VFP's OLEDragDrop it *is* possible to drop image data dragged from (for example) MS Office applications to a VFP OLEDragDrop target. Special thanks to Herman Tan for pointing out how to do this in the recent thread titled "OLEDragDrop GetData() in BMP/WAV format?".
>
>Unfortunately, the OLEDragDrop() event's oDataObject.GetData( CF_DIB ) request returns a raw DIB data stream vs. a handle to a DIB structure. I'm looking for suggestions on how to convert this DIB stream to a DIB handle so I can use the excellent GDIPLUS class on News2News.com that converts a DIB (via its handle) to any of the image types supported by Windows GDIPLUS subsystem.
>
>Any suggestions?
>
>Thank you,
>Malcolm


Hi Malcolm,

This is what I think. The easy way to is to transform the DIB data from VFP into Bitmap Handle (HBITMAP). CreateDIBSection() API can do that. But unfortunately this is not so easy either <*g*> It's because (I think) you still have to parse the BITMAPINFOHEADER structure to get the right Bits Offset in order to make the function works properly.

Regards
Herman
Previous
Reply
Map
View

Click here to load this message in the networking platform