im a nikon dude, but the d40x is crap imo.
to give you a real response we need to know what kind of photographer you are, what the application of the camera will be etc.
and if you dont know what you want then it prolly wont matter much which camera you end up with until you learn enough to know, in which case you can sell what you bought in a year and upgrade to what you need.
please dont end up with a sony.
XTi, but play with them both and see whats right for you. you may hate them both and wind up with a sony or pentax.
One thing I'll say, and this applies to any dSLR... is that if it seems to be lacking in contrast, it is most likely not a fault of the camera. If you are used to using compact digital cameras, or shooting colour film, then you may be used to quite contrasty and saturated images, which are the result of processing applied to the image (in-camera in the case of digital compacts)... however dSLRs tend to produce images with lower saturation, sharpening, and generally less 'punch'... the idea being that the user wants to take more control over the image in post-processing.
Of course, apparent lack of contrast could also be due to a number of other factors, including the lighting and the lens used.
Regarding construction, I'm afraid most dSLRs in this price range ('entry-level' bodies) use a lot of plastic... none are going to be really solidly built in the way that higher-end bodies are... on the other hand none are really likely to fall apart on you; just try to avoid dropping them. My 'entry-level' body has taken a few knocks and falls and keeps working... so I wouldn't worry too much about the build unless you expect to be shooting in environments where damage to the camera is not only possible but likely.