Until now, I used the command GetPicture, DrawPicture and KillPicture to get
a picture from a resource file and draw it into a window (dialog). Now
(since 10.4) are this command deprecated.
What command can I use to do the same with the new API?
Any code samples available?
Thanks a lot.
Greetz
Hans
> Hi
>
> Until now, I used the command GetPicture, DrawPicture and KillPicture to get
> a picture from a resource file and draw it into a window (dialog). Now
> (since 10.4) are this command deprecated.
>
> What command can I use to do the same with the new API?
Erm. _Which_ new API? I think the current recommended mechanism for
procedural code uses QuickTime and discrete image files. Without error
checking...
GraphicsImportComponent gi;
Rect r;
GetGraphicsImporterForFile(&myFSSpec,&gi);
GraphicsImportGetNaturalBounds(gi, &r);
GraphicsImportSetQuality(gi,1024);
GraphicsImportSetBoundsRect(gi,&r);
GraphicsImportDraw(gi);
CloseComponent(gi);
> Any code samples available?
Lots at Apple's site. There are other mechanisms as well. Note that
FSSpecs are pretty much discouraged for new development, too, but
there's a simple variation on the above using the preloaded image data.
--
The best intentions in the world don't make a flawed argument magically valid.