Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDragDrop GetData() in BMP/WAV format?
Message
De
23/05/2005 13:34:14
 
 
À
23/05/2005 12:36:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01016102
Message ID:
01016834
Vues:
47
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform