>>I want to thank you again for the information you've provided. I have been able to successfully create icon files (both 32x32 and 16x16) from the icon handles (including being able to shrink a 32x32 to a 16x16. The only problem seems to be that an older image editor (ImagEdit) doesn't seem to recognize the format of the 16x16 (says it's not version 3.0). Another, ImageEdit32, loads but doesn't display anything. However, VC++ 6.0 SP5 seems to have no trouble.
>>
>>I mention this because I'm wondering if the smaller image will show up in the Windows Explorer. I haven't tested it so far. If you've got any information, I'd appreciate hearing from you.
>
>I have used this method mainly with bitmaps and have not tested thoroughly with icons.
If you do, please let me know.
>>I also managed to circumvent the memory management routines to get a local copy of the BSTR. I used SYS(2600) passing the SysAllocString() function as a parameter.
>
>AFAIK SYS(2600) appears only if VFP7. In that case an icon can be stored using SavePicture() function:
>
>* Code for VFP7
>...
>OleCreatePictureIndirect(@PictDesc, @iid, 1, @IPic)
>SavePicture(IPic, "tmp.ico")
>
>Or I'm missing something?
SavePicture() requires an object reference in VFP. I've tried with value returned by OleCreatePictureIndirect() but that's simply a pointer to the object. That doesn't work. In order to use SavePicture(), I'd have to use SYS(2600) to copy the object. Unfortunately, I have no idea as to what to specify for the size. Or am I misunderstanding something here?
George
Ubi caritas et amor, deus ibi est