Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExtractIcon : how to extract an EXE associated ICON
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00251371
Message ID:
00251381
Views:
7
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform