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

Setting a Window's Modification State

Your application should inform the Window Manager when a document has unsaved changes by calling the function SetWindowModified . When you do so, the Window Manager displays the document's proxy icon in a disabled state and prevents the user from dragging the proxy icon. Disabled proxy icons cannot be dragged because unsaved documents cannot be moved or copied in a manner predictable to the user. Listing 2-10 provides an example of how your application might call SetWindowModified to set the modified state of a window.


The only time that a document's proxy icon should be disabled is when the document has unsaved changes. Your application should not disable the proxy icon at any other time.

Listing 2-10 Setting the modified state for a window

void MySetDocumentContentChanged( WindowDataPtr pData, Boolean changed )
    pData->changed = changed;
    SetWindowModified( (WindowPtr)pData, changed );

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