realbasic-nug
[Top] [All Lists]

Re: How to set "Use custom icon" flag

To: jungk at flippingdades dot com, REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How to set "Use custom icon" flag
From: Kevin Ballard <kevin at sb dot org>
Date: Tue, 11 May 2004 23:54:29 -0400
Cc:
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
References: <20040511164208 dot 94E6A%00150789 at spersaoaxaca dot com dot mx>
Drag the Carbon Declare Library (<http://www.tildesoft.com>) into your project and use the following code:

SetFinderInfoFlags(myfolderItem, kFinderFlagsHasCustomIcon, kSetFinderInfoModeOR)

The OR means to OR the custom icon flag with the current flags, i.e. set the custom icon flag. To unset it you would use Bitwise.BitwiseNOT(kFinderFlagsHasCustomIcon) and kSetFinderInfoModeAND.

HTH,
Kevin

On May 11, 2004, at 5:42 PM, jungk at flippingdades dot com wrote:

My app saves graphic files and the user can choose a creator code so
that it can be double clicked into Photoshop or Graphic Convertor or
whatever. But, I would like to put a custom icon on the file. I have
gotten as far as adding a resource fork and putting the icon there, but
it doesn't show until I manually set the "use custom icon" flag. Is
there a way to do this RB? I looked at FolderItem, and Resource Forks,
but found nothing about this setting.

--
Kevin Ballard
kevin at sb dot org
http://www.tildesoft.com
http://kevin.sb.org

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>