Herman!
You also have been in the Thread "File association icons" (Starting with Message#
1045284) and possibly do know what is coming now ;-) But for the others who might like to join and help us, here the status.
We (Naomi to be precise) needs to get the associated Icons for different file types. However as she's working with Grids instead of ListViews, she'd be better off with Bitmaps instead of Icons.
Using my IconBuddy-Class as well as Alexander Golovlev's gpImage-Class this can be achieved with a few lines of code. This is how it goes:
ogpInit = newobject("gpinit", "gpImage.prg")
ogpImage = newobject("gpimage", "gpImage.prg")
oIconBuddy = newobject("iconbuddy", "iconbuddy")
oSmall = null
oLarge = null
? oIconBuddy.GetAssocIconPairObjects(getfile("xls"),@oLarge, @oSmall)
? ogpImage.FromPicture(oLarge)
? ogpImage.SaveAsBMP("XL_Large.bmp")
? ogpImage.FromPicture(oSmall)
? ogpImage.SaveAsBMP("XL_Small.bmp")
Problem however: The transparent color of the Icon is converted to black. Unfortnately I was not able to convince her that black-backgrounded icons really *are* cool, and so this is my task now to find a solution how to change the icon's transparent area to a color of choice (preferrably white) *before* converting them to a bitmap.
Could You or any of the other GDI+/API - gurus please give us (me) a hand on that? I also invited Alexander Golovlev. I think he could be of great help.
THX