Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extract Associated Icon to a Treeview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00668799
Message ID:
00669432
Vues:
25
>It seems that the OleCreatePictureIndirect(@PictDesc, @iid, 1, @IPic) which I assume will populate the IPic reference variable is null after the call. The PictDesc variable seems to contain a few high ascii characters. If I can't get the icon into a treeview control via the imagelist, is there an easy way to simply draw the icon elsewhere, like in a picture control?

First, are you getting an icon handle back from ExtractIconEx()?

Second, yes, but it's not very stable. You'd pass the icon to DrawIcon(). Unfortunately, because VFP doesn't "know" about the image, it's tough to keep it correctly updated.

Third, as I said, I've used Alexander's code as a basis for my own work (creating an icon file from an icon handle). So, I know it does work. I'm going to take a look at your previous post again to see if there's something that I've over looked.

>
>
>>>I am still trying to get the basics working. Even using the posted code, I am getting nowhere. At least this is not generating the C00000005 errors.
>>>What am I missing? I am passing the file path, the icon index, and a reference to the imagelist.
>>
>>I'm having some of my own troubles here as well. I can and have been able to use Alexander's code to create icon files from the handle. However, I've been playing around with populating a ImageList, which seems to work fine. The problem is in associating the ImageList with a ListView. Don't know whether or not it's me or something to do with the nature of the image created. Is this where you're having problems too?
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform