remove WinMain, fix window resize bug