Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC
PATHDocumentation > Mac OS 8 and 9 > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


SetWindowProxyCreatorAndType

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

pascal OSStatus SetWindowProxyCreatorAndType (
                     WindowPtr window,
                     OSType fileCreator,
                     OSType fileType,
                     SInt16 vRefNum);
window
A value of type WindowPtr . Pass a pointer to the window for which you want to set the proxy icon.
fileCreator
A four-character code. Pass in the 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 four-character code. Pass in 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. See Result Codes.
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. See Creating a Window for an example of how your application can call the SetWindowProxyCreatorAndType function.

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. See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.

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

Available with Mac OS 8.5 and later.


1999 Apple Computer, Inc. – (Last Updated 18 March 99)

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice