Get resizing working. Note that it's using some extremely obsolete functions