>Hi
>
>I am trying to get the name, and path of an applications associated icon
>
>Does any one know parameters I have to pass to
>
>ExtractIcon, and ExtractAssociatedIcon API.
>
>I think I have the correct systax,bur I get an exception error when I run my code.
>
>I am trying to pass the window handle, the file path & name, but I am not really sure how I should pass the third argument, as it is a WORD TYPE.
>any help or example of this in VFP would be a big help
>
>Regards
>
Hi Steven,
Look at my article, "Use Windows to Create Windows", FoxPro Advisor, August, 1998, it contains the syntax for both of these. You'll also have to pass the instance handle of the caller. You get this from the GetClassLong()function, passing GCL_HMODULE as the index.
The two functions have a very similar declaration. There is one significant difference, ExtractAssociatedIcon() requires that the index parameter (the last one) be passed by reference. ExtractIcon() passes it by value. If you pass the parameter by value to ExtractAssociatedIcon(), VFP blows up.
If you care to post your code, I'll be happy to try and help further.
George
Ubi caritas et amor, deus ibi est