In the past, some applications have associated information with a window by creating a structure that contains both the window's window record and the application's data. However, this technique is not Carbon-compliant. Your application should use the standard mechanism provided by the Mac OS 8.5 Window Manager instead, by which any kind of data can be associated with a given window. Or, optionally, your application may use the pre-Mac OS 8.5 functionality provided by the SetWRefCon function, which allows your application to associate a pointer to data with a pointer to a window.
The Mac OS 8.5 Window Manager provides the following functions for associating data with windows. See Managing Multiple Windows for a discussion of how your application can use these functions.