Add HWND.RegisterClass and CreateWindow shared functions