You could try to restore the game to a previous version and see if that fixes your window issue. However, since you changed the settings with WinAPI, it's an issue with your computer settings, not the game settings.