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.
IMPORTANT
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 );
}