SetWRefCon
SetWRefCon Set the reference value (refCon) for a window
#include <Windows.h> Window Manager
void SetWRefCon( theWindow, newRef );
WindowPtr theWindow ; window to modify
long newRef ; desired reference value
SetWRefCon sets the "reference constant" (the WindowRecord.refCon value)
for the selected window. The reference constant is an application- defined
value you can use for any purpose.
theWindow is a WindowPtr obtained via NewWindow or GetNewWindow.
newRef is a 4-byte value for the private use of your application. This value
will be stored in the WindowRecord and will be available via
Returns: none

Notes: Use this to store some identifier or other information so that you can more
easily classify or identify the window later.
You may wish to use the WindowRecord.refCon field to hold a pointer or
Handle to additional information about the window. Just allocate some
storage on the heap and save its address using this call. Be sure to free the
allocation when you close the window.