On 1/18/06 2:48 PM, Jeremy Sagan didst favor us with:
> That sounds good. I would like to use 'icns' resource with
> PlotIconRef. I am having trouble obtaining an iconref though. If I
> have an 'icns' resource in my main application resource file (which
> is in the app's bundle) how do I turn that into an iconref I can call
> ploticonref with?
I require 10.3 or later, so I use this:
OSErr CreateIconRef( IconFamilyHandle inIconFamily, IconRef &outIconRef )
{
if ( inIconFamily == nil )
return nilHandleErr;
Size hSize = GetHandleSize( ( Handle ) inIconFamily );
return GetIconRefFromIconFamilyPtr( *inIconFamily, hSize, &outIconRef );
}
It's a little more work if you need to support 10.2, but it's doable.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden