Skip navigation.
 
mlRe: Setting a file's icon
FROM : Rick Roe
DATE : Wed Jan 02 21:58:01 2002

>> Next, you need to save this data as the file's custom icon.
>> Icon Services or Icon Utilities may have functions for doing this...
>> I'm not sure.  If not, use the Resource Manager to save the data
>> as an icns resource id -16455 in the file, and set the "has custom
>> icon" bit in the file's finderInfo flags.

>
> And if you have several kinds of documents which a single app can
> produce & work on, what do you do to avoid having several icns
> resources with the same id (-16455) that you mention?
> Or do you even need to make sure that the type & id (together)
> are unique?


ResourceManager resources must be unique by type and ID: you can have both
an icns ID 128 and a ppob ID 128 in the same file, for example.

That's not an issue here, though. A file has only one icon which is
displayed in the Finder: either the icon of its document type, which comes
from whichever application owns that document type, or a custom icon which
is stored in the file. A file can have only one custom icon.

--
Rick Roe
icons.cx / The Omni Group


Related mailsAuthorDate
mlSetting a file's icon kubernan Dec 30, 06:27
mlRe: Setting a file's icon Rick Roe Jan 1, 02:34
mlRe: Setting a file's icon Rosyna Jan 1, 02:47
mlRe: Setting a file's icon jgo Jan 2, 18:40
mlRe: Setting a file's icon Rick Roe Jan 2, 21:58
mlRe: Setting a file's icon jgo Jan 3, 16:52
mlRe: Setting a file's icon Rainer Brockerhoff Jan 4, 10:58