Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract Associated Icon to a Treeview
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00668799
Message ID:
00669442
Views:
28
>I have been passing 0 as the IconIndex. Perhaps I am trying to accomplish the wrong task: I am not trying to extract an icon from an EXE file, but I want to display the icon of the application associated with a file extension. For Example, a file with a '.doc' extension will display the MS Word icon. Am I using the wrong API? If so, which one does Windows Explorer use?
>
>Thanks for your patience and rapid response.
>
Troy,

No problem. Substitute ExtractAssociatedIcon(). As I mentioned earlier it sounds like you weren't passing the icon index parameter properly (by value rather than reference). All you need is a valid icon handle. If you like post the code that was causing the C5.

One note, however, the icon displayed in the Explorer, is determined sometimes by the index in the registry. For example, VFP has 12 icons embedded in its exectuable. That's how the Explorer knows to display which icon for the various types of VFP files.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform