Login | |
|
 |
RE: Icons - 11/28/2006 1:56:09 AM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
Well, let me clarify a little. I'm making a UI file browser and I don't want to have to hold on to a separate set of images for each file type, instead I'd like to have the files show the proper icons as defined by the dll/exe. I've been diggin a bit in the registry but can't find a list to refer to.
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
RE: Icons - 11/28/2006 12:22:40 PM
|
|
 |
|
| |
Parabellum
Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
|
if i understand your right... this shouldnt be too hard.. each file extension is listed unde HKEY_CLASSES_ROOT eg [HKEY_CLASSES_ROOT\.abc] and it should also have a default value assigned to it eg [HKEY_CLASSES_ROOT\.abc] @="ABC_File" this relates to another key in classes root; [HKEY_CLASSES_ROOT\ABC_File] you can creat a subkey in this key called DefaultIcon eg [HKEY_CLASSES_ROOT\ABC_File\DefaultIcon] and assign the default DWORD the correct path to the icon file so the complete reg file would be..... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.abc] [HKEY_CLASSES_ROOT\.abc] @="ABC_File" [HKEY_CLASSES_ROOT\ABC_File] [HKEY_CLASSES_ROOT\ABC_File\DefaultIcon] [HKEY_CLASSES_ROOT\ABC_File\DefaultIcon] @="C:\\Program Files\\somePRogram\\programl.exe,0" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hope that helps..
|
|
| |
|
|
|
 |
RE: Icons - 11/28/2006 10:44:28 PM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
TNO, Are you using HTA as a UI? If yes how are displaying the icon in the HTA?
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: Icons - 11/29/2006 2:38:34 AM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
quote:
TNO, Are you using HTA as a UI? If yes how are displaying the icon in the HTA? Well, thats the problem Fredledingue.....I haven't figured that out yet. Instead of just displaying a list of files in a <DIV> tag with images (gif,jpg, etc), I tried to Embed the FileList control to kill 2 birds with one stone but it looks like you can't script this object (The FileList control is the object in every single folder that shows you your files) <object id=FileList classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2" > <param name="Location" value="%THISDIRPATH%\folder"> <param name="AlignLeft" value="1"> <param name="AutoSize" value="7"> <param name="AutoSizePercentage" value="100"> <param name="AutoArrange" value="1"> <param name="NoClientEdge" value="false"> <param name="ViewMode" value="3"> </object> Unless one of you old-school programmers can figure this out (I'm not too keen on creating type libraries to access dll's and make them functional..). My second thought is to to look-up and reference an ico from a dll/exe from a filetype and display it using an activeX control (not sure which one yet ) If all else fails I'll have to rely on dynamically inserting the filename/images from VML (a.k.a recreate the icons so everything is in one file)
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
RE: Icons - 11/29/2006 10:34:04 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
quote:
ORIGINAL: CaffeineAddiction Both HTAs and HTML can use .ico files just like using a .jpg or .gif Ok if you'v got the .ico files separatly. What about getting the icon from a dll or an exe file and display it in your hta/html? That's the whole point TNO is talking about ______ TNO what's a VML file?
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: Icons - 11/29/2006 4:41:42 PM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
I didn't mean a VML file, I meant Vector Markup Language.
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
RE: Icons - 11/30/2006 9:44:26 PM
|
|
 |
|
| |
est
Posts: 39
Score: 0
Joined: 10/12/2006
Status: offline
|
There was ONCE a very useful Asyn Pluggable Protocol called: sysimage, and that's exactly what you wanted. But for some security reasons, Microsoft disabled sysimage:// and give up it permanently in IE7. So the only solution I could offer by far, is the res:// Asyn Pluggable Protocol: Example: In IE6, type res://shell32.dll/3/6 es, IE displays some messy code. In fact, these messy characters are exactly the first icon in C:\Windows\Shell32.dll So try ResHacker or eXeScope to open shell32.dll and find the ICON resource, export the first icon out and compare it with those gibberish in IE, your shall find these two quite the same. At last it's easy to extrat the .ico content from shell32.exe, using ActiveXObject InternetExplorer.Application, or you can possibly use a hack like me in this post: http://www.visualbasicscript.com/m_39737/tm.htm
_____________________________
Do NOT program in a programmer's way
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|