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


Associates a file with a window.

pascal OSStatus SetWindowProxyAlias (
                     WindowPtr window,
                     AliasHandle alias);
A value of type WindowPtr . Pass a pointer to the window with which the specified file is to be associated.
A value of type AliasHandle . Pass in a handle to a structure of type AliasRecord for the file to associate with the specified window. You can obtain an alias handle by calling the function GetWindowProxyAlias . See Inside Macintosh: Files for more information on aliases.
function result
A result code. See Result Codes.

Your application should call the SetWindowProxyAlias function to establish a proxy icon for a given window. The creator code and file type of the file associated with a window determine the proxy icon that is displayed for the window.

Because the SetWindowProxyAlias function won't work without a saved file, you must establish the initial proxy icon for a new, untitled window with the function SetWindowProxyCreatorAndType , which requires that you know the file type and creator code for the file, but does not require that the file have been saved.

See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.


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 SetWindowProxyAlias function.


Available with Mac OS 8.5 and later.


The function SetWindowProxyFSSpec .

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

Get information on Apple products.
Visit the Apple Store online or at retail locations.

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