Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File association icons
Message
 
À
01/09/2005 15:15:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00728027
Message ID:
01045972
Vues:
50
Naomi (and Malcolm)

>>
>> No we are not that far yet. currently we get Icons only. I am just trying to push her into it ;-)
>> No, actually it would be my task to implement an IconObject2BMP-Method there. But like her,
>> I have some *real* tasks to do. Maybe I find an easy solution.
>
> I've enjoyed this thread and learned alot. I bet there is a gdiplus
> api for converting icons to bmps? Or maybe Anatoliy has a trick for
> this at www.news2news.com?
>
> Thanks for sharing your conversation with the rest of us.
>


OK, I have just downloaded Alexander Golovlev's GDI+Image- class its download #18584 .

With this at hand, all there is to do is:
ogpInit    = newobject("gpinit", "gpImage.prg")  && <-- needed as a basis for gpImage
ogpImage   = newobject("gpimage", "gpImage.prg")
oIconBuddy = newobject("iconbuddy", "iconbuddy")

*-- vars for the Icons
oSmall     = null
oLarge     = null

*-- get the icons for an Excel-File 
? oIconBuddy.GetAssocIconPairObjects(getfile("xls"),@oLarge, @oSmall)

*-- load the large Icon into the gpImage-Class
? ogpImage.FromPicture(oLarge)

*-- And save it as a bitmap
? ogpImage.SaveAsBMP("XL_Large.bmp")

*-- the small one too
? ogpImage.FromPicture(oSmall)
? ogpImage.SaveAsBMP("XL_Small.bmp")

*-- And we're  D O N E ! !
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform