Carbon


SetWindowProxyCreatorAndType

Header: MacWindows.h Carbon status: Supported

Sets the proxy icon for a window that lacks an associated file.

OSStatus SetWindowProxyCreatorAndType (
    WindowRef window, 
    OSType fileCreator, 
    OSType fileType, 
    SInt16 vRefNum
);
Parameter descriptions
window

A pointer to the window for which you want to set the proxy icon.

fileCreator

A code that is to be used, together with the fileType parameter, to determine the proxy icon. This typically is the creator code of the file that would be created, were the user to save the contents of the window.

fileType

A code that is to be used, together with the fileCreator parameter, to determine the proxy icon. This typically is the file type of the file that would be created, were the user to save the contents of the window.

vRefNum

A value identifying the volume containing the default desktop database to search for the icon associated with the file type and creator code specified in the fileCreator and fileType parameters. Pass kOnSystemDisk if the volume is unknown.

function result

A result code.

DISCUSSION

A new, untitled window needs a proxy icon in order to maintain visual consistency with other windows under Mac OS 8.5 and later. Your application should call the SetWindowProxyCreatorAndType function when you want to establish a proxy icon for a window, but the window’s data has not yet been saved to a file.

If the window’s data has been saved to a file, your application can call the functions SetWindowProxyFSSpec or SetWindowProxyAlias to associate the file with the window and thereby establish the proxy icon.

SPECIAL CONSIDERATIONS

With Mac OS 8.5, you must save and restore the current graphics port—by calling the QuickDraw functions GetPort and SetPort—around each call to the SetWindowProxyCreatorAndType function.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)