Control device for opening and closing windows