ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Creating Custom Icons for Documents Generated by a Plug-In

Q I developed a plug-in MyPlugIn for an application TheApplication. I'd like to make a special icon for the documents created by this plug-in (which is a TheApplication document).

If I add a BNDL resource in my plug-in, all other plug-ins become MyPlugIn documents. What can I do?

A Since your plug-in is a TheApplication document, you can't add a BNDL resource in it, otherwise you create a conflict with the TheApplication's BNDL.

The only way to construct special icons for the documents your plug-in creates is to use Custom Icons. In each document you create, add an icon family (icl4, icl8, ICN#, ics#, icl4, icl8) with resource ID: -16455. Don't forget to set the HasCustomIcon bit in the document's Finder flags.

You could also add a 'vers' 1 and 2 resource to further help the user identify the documents your plug-in creates.

This way, all plug-ins will still be TheApplication documents, and all the documents your plug-in creates will have a custom icon as well as 'vers' information.

See Also:

For an explanation of customized document icons, see pages 7-17 to 7-18 of Inside Macintosh: Macintosh Toolbox Essentials.

Updated: 3-July-96


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.