SetWRefCon
SetWRefCon Set the reference value (refCon) for a window long newRef ; desired reference value
for the selected window. The reference constant is an application- defined
value you can use for any purpose.
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
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.