Auto? I own the K10D and there is no "Auto" meter mode as such.
As Adam noted above, your best bet for no-fuss correct exposure is to set the metering mode to matrix (as opposed to spot or center-averaged). Even that mode may result in over/underexposure of all or part of the frame with some subjects (strong back-lighting or mix of very bright/very dim elements in frame). In those cases you will need to apply exposure compensation or use the AE lock or perhaps manual metering.
As for the specifics for the subject for your original post (bright window, dim room with the intent to show detail in the room). Point the camera to the part of the room you want to be properly exposed being careful to exclude the window from the frame. Push the AE-L button, re-frame, and take the photo.
-- or --
Use spot metering and frame your subject in the center of the viewfinder. Push the AE-L button, re-frame, and take the photo.
In short:
- Meter the part of the frame that you want correctly exposed
- Force the camera to use those settings
- Be aware that your camera cannot reproduce both very bright and very dim with full detail in the same frame
If any of the above does not make sense, a little time with the camera manual might help.
Steve