Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 28th, 2005, 6:01 AM   #1
Pedja
Programmer
 
Join Date: Nov 2005
Location: Belgrade, Serbia & Montenegro
Posts: 31
Rep Power: 0 Pedja is on a distinguished road
Send a message via ICQ to Pedja Send a message via MSN to Pedja Send a message via Yahoo to Pedja
Unhappy Displaying actual icon for the file name in my ListView control

In windows OS, whitch icon will be displayed for witch file name depends
of the file extension and programme that is set to be activated
if that file name is clicked. How can I get those icons for every file
extension. Is that written somewhere in registry. When you assign Media player as default player for .avi all .avi files get Media player icon. How that works? How can I use it?
Pedja is offline   Reply With Quote
Old Nov 28th, 2005, 9:44 AM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
You first go to this key:
HKEY_CLASSES_ROOT\.ext

where you replace ext by the file extension you are looking the icon for. You take the default value of that key. I'll take the bmp file as example. The default value of HKEY_CLASSES_ROOT\.bmp is Paint.Picture. That means the icon is stored here:
HKEY_CLASSES_ROOT\Paint.Picture\DefaultIcon

Maybe there is a specific function for it, but this is a way.

Good luck
Polyphemus_ is offline   Reply With Quote
Old Nov 28th, 2005, 10:21 AM   #3
Pedja
Programmer
 
Join Date: Nov 2005
Location: Belgrade, Serbia & Montenegro
Posts: 31
Rep Power: 0 Pedja is on a distinguished road
Send a message via ICQ to Pedja Send a message via MSN to Pedja Send a message via Yahoo to Pedja
Smile Thank you, but I have another question

Thank you very much. But I still don't know how to get an image that is stored in .exe or .dll file. If you could show me how to do this, or direct me to place where I could learn it, I would be most gratefull.
Pedja is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:27 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC