Help! Getting the "default icon" for an application, but not what you think...

  • Thread starter Thread starter Drebin
  • Start date Start date
D

Drebin

OK, I need to pull out the default icon for application type. Picture in
Windows explorer, how the correct icon shows up for each file in a folder.

Turns out, you go into HKCR:[file extension] and pull out the default entry,
then you go under HKCR:[file type]\DefaultIcon - and that will be something
like %systemroot%\shell32.dll,14 - the location and icon number. Great!

Here's the tricky part. This works for every single file extension (and
..exe's are handled differently) **EXCEPT** for .txt and .log extensions.
These are associated with Notepad, and show the correct icon in Windows
explorer.. but in my application, it shows a funky/wrong icon.

In the registry, it's %SystemRoot%\system32\shell32.dll,-152

What's up with that? It's the only negative resource number I've seen.
Regular icon 152 is a CDROM, so that's not it.. so I don't even know how
it's finding ANY icon.

Any ideas of what's up with this? Do I understand correctly that the number
after the DLL is the internal resource id? if so, why is this a negative
number??? I'm stumped. Thanks in advance
 
Back
Top