Your application is likely to have multiple windows on the desktop at once: one or more document windows, possibly one or more dialog boxes, and possibly some special-purpose windows of your own. Only one window is active at a time, however.
You can use various strategies for keeping track of different kinds of windows. In the past, some applications have done this by creating a structure that contains both the window's window record and the application's data. However, this technique is not Carbon-compliant. Instead, you can use the Mac OS 8.5 Window Manager function SetWindowProperty , which allows any kind of data to be associated with a given window. Alternately, you may use the pre-Mac OS 8.5 functionality provided by the SetWRefCon function, which can allow your application to associate a pointer to data with a window.