Subject: Re: Getting the Generic Hard Disk Icon?



Try this:

NSString *codeStr = @"hdsk";
OSType code = UTGetOSTypeFromString((CFStringRef)codeStr);
NSImage *picture = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(code)];

I just happened to be in Apple's IconCollection sample code yesterday, so this is pulled pretty much directly from there. Hope it helps!

On Mar 27, 2009, at 6:58 AM, Dave wrote:

Hi All,

Where can I get the Icon for the standard Internal Hard Disk Icon? I've looked in /System/Library/CoreServices/CoreTypes.bundle/ Contents/Resources and found a lot of icon's there, but not one for the hard disk. I just want the Icon the Finder displays for the internal hard drive.

All the Best
Dave


Mike Glass
Developer
Marware, Inc.

mikeg@xxxxxxxxxxx
http://www.projectx.com
http://www.marware.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy