has listed all the file extensions avaliable there, but there is no
general way to extract icons for those extension...
kindly help
A random extension in the registry, HKEY_CLASSES_ROOT: ".ftt". Contains
nothing but the Default key "FFTFile". The key "FFTFile" has a subkey
"DefaultIcon", and that contains "misc.exe,6" (the 6th icon in misc.exe,
whatever that is -- well, it IS a random example). Use ExtractIcon to, err,
extract this icon, if you really want to.
But there is no need to do this manually! The function ExtractAssociatedIcon
does *precisely* what the shell does (!). From MSDN:
"HICON ExtractAssociatedIcon(HINSTANCE hInst, LPTSTR lpIconPath, LPWORD
lpiIcon );
[...]
lpIconPath: Pointer to a string that specifies the full path and file name
of the file that contains the icon. The function extracts the icon handle
from that file, or from an executable file associated with that file. If the
icon handle is obtained from an executable file, the function stores the
full path and file name of that executable in the string pointed to by
lpIconPath."
Long URL warning: here comes a long URL.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/icons/iconreference/iconfunctions/extractassociatedicon.asp
[Jongware]
Check out SHGetFileInfo.
Michael
I can't help you actually extract the icons. I can help a bit if
you're trying to change the icon that _Windows_ displays as a user
wanders around in Explorer. For that, you need to change the "File
Associations". So I used google to look up
file associations
in this newsgroup and got 78 hits. I didn't find anything wonderfully
helpful, but I only looked quickly. A 25 January 2001 contribution by
Jackson Yee to a thread called "File Associations" provided a sketch.
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com