>I want save icon to separate file. I have the file, for example test.xls. Using API function ExtractAssociatedIcon I can obtain handle to icon associated to this file (in EXCEL.EXE usually). I want save this icon to separate ico file, for example excel.ico. How to do this? Is there a some API function?
>I have another question. Can I use handle to icon in standard picture object on VFP form to displaing icon?
>
>Thanks.
>
Maros,
To answer your last question first, no you can't use a standard picture object to display an icon based on its handle. You can, however, use DrawIcon() in Shell32 to do this. Be aware, however, that there can be some refresh problems simply because VFP isn't "aware" of the image. I do use this technique for an "About..." dialog class that I have. It gets the icon handle from the executable and displays it on the dialog along with information retrieved using AGETFILEVERSION().
In regards to your first question, I've seen freeware that can do this (IconSucker). I've been playing around with trying to do something similar, but have had problems retrieving the necessary structure required to create the file.
George
Ubi caritas et amor, deus ibi est