The challenge is that you have a scene with very large dynamic range.
When you photograph the window from a distance the camera is exposing for the overall scene and you get the curtain somewhat over-exposed and the external scene through the window is fully washed out.
As you approach the window the camera is tending to expose for the central light = external scene and illuminated curtains. The exposure is reduced to approximately correctly expose the window and curtains and the room exposure is now too low.
The overall dynamic range present is such that you will not be able to expose every part of the scene correctly in a single photo bit you can make decisions re what parts of the scene will be exposed in what manner.
To expose the curtains and internal parts of the room more correctly as you approach the window you need to meter on the sides of the scene, lock the exposure to this setting then recompose the scene as required. Most cameras have the ability to lock exposure either by toggling or by holding an exposure control button down - AEL on Sony / Minolta. ?? on your camera. OR you can change to manual exposure and adjust accordingly. In this case, using say f/8 to f/16 and leaving ISO and shutter speed as is will move you in the right direction.
If you want a final photo that has detail internally and externally you can use multiple exposures with different settings and combine them afterwards (HDR type effect) or you can try exposing for the outside conditions and then using fill flash to illuminate the room interior. If you use flash the results well depend on how much intelligence your camera tries to apply and it may be easier to use wholly manual control of camera settings and flash than to fight the cameras 'brain'. Depending on the camera, if using auto settings you may need to push flash compensation up substantially to illuminate the interior correctly.
An interesting method which is more in the enthusiast area than liable to be of use casually is to set the camera for a very long exposure (say 10 seconds+) with the interior exposed correctly and then place a "mask" in the window area for part of the exposure to reduce the window exposure. Such masks are usually hand made to suit the scene, have the edges "feathered" to produce softer edges and are then "waved round" by hand to remove the effects of the borders. Those suitable skilled in the art can achieve quite good results BUT for a beginner, taking multiple exposures at different exposure levels and post-combining them is liable to be easier.
If your camera has an inbuilt HDR facility then this is the time to try it!.
Super super super rough !!!!!!!!!! - example only: