+ use SetWindowLongPtr() instead of SetWindowLong() whenever required. + reset GWLP_USERDATA when calling the parent window windowproc.