Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert DIB data stream to DIB handle
Message
De
24/05/2005 13:20:45
 
 
À
24/05/2005 01:14:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01016972
Message ID:
01017155
Vues:
22
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform