Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Feb : Associate an Icon with an Extension

www.cryer.info
Managed Newsgroup Archive

Associate an Icon with an Extension

Subject:Associate an Icon with an Extension
Posted by:"Charles Hacker" (reply...@borland.newsgroups)
Date:Wed, 22 Feb 2006 17:59:41 +1000

Hi all,

So far I have been able to develop code that will associate an extension
'*.sch' with my application, by setting registry enteries.
The association works file, and on double clicking the file, it will
start in my Schematic application.
However, I can NOT get the ICON to associate with it.

So i have set a registery item for '.sch' to be registered as
Schema_File as:
   HKEY_CLASSES_ROOT\.sch
   @="Schema_File"

And set Schema_File to:

  HKEY_CLASSES_ROOT\Schema_File
          @="Schematic File"

  HKEY_CLASSES_ROOT\Schema_File\shellopen\command]
          @="C:\SCHEMA\CIRCSCHEMA.EXE \"%1\""
and
  HKEY_CLASSES_ROOT\Schema_File\DefaultIcon]
          @="C:\SCHEMA\CIRCSCHEMA.EXE,1"


But just setting "DefaultIcon" does not seem to work for specifying an
icon, so is anyone else familiar with what else do I need.


Regards,
Charles Hacker

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive