fix registering of CreateSubWindow