In our previous episode, Anthony Walter said: > BaseWindow := CreationWindow; > BaseWindow.FHandle := Wnd; > SetWindowLong(Wnd, GWL_USERDATA, Integer(BaseWindow)); Not 64-bits safe. An integer is not a long. Ptruint probably.