fixed win32 close bug and modify change resolution