AddFilePreview
TheAddFilePreviewfunction allows you to add a preview to a file. You must have created the preview data yourself. If the specified file already has a preview defined, theAddFilePreviewfunction replaces it with the new preview.
pascal OSErr AddFilePreview (short resRefNum, OSType previewType, Handle previewData);
resRefNum- Specifies the resource file for this operation. You must have opened this resource file with write permission. If there is a preview in the specified file, the Movie Toolbox replaces that preview with a new one.
previewType- Specifies the resource type to be assigned to the preview. This type should correspond to the type of data stored in the preview. For example, if you have created a QuickDraw picture that you want to use as a preview for a file, you should set the
previewTypeparameter to PICT.previewData- Contains a handle to the preview data. For example, if the preview data is a picture, you would provide a picture handle.
DESCRIPTION
If you pass 0 for thepreviewTypeandpreviewDataparameters, the file preview is removed.ERROR CODES
File Manager errors
Memory Manager errors
Resource Manager errorsSEE ALSO
You can use theMakeFilePreviewfunction, described in the previous section, to create a new preview for a file.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help