Glen's Update to RegisterWindow