You won't like the performance of 40D specially if you are new to DSLR.
I have gone from SLR to bridge camera to DSLR and I can tell you about my experience.
I have been able to use a Canon S3 IS bridge camera and what drew me to it was the swivel screen.
Coming from an SLR, I pretty knew much what I was doing and after going to Canon P&S bridge camera I was ready for my first DSLR.
I've done a lot of research and finally found my way to Pentax.
Finally bought a new K100D super last year or so and am still happy about it.
It just had too many keeper shots for me with the built in SR (shake reduction).
My brother knew I was into cameras so he gave me a Canon Rebel XT.
I tried that out a bit to compare to the Pentax but the keepers that I get from it are not just that many or good!
Eventually I planned to give that to my wife but a situation presented itself that a Canon 30D was being sold at almost the same price which I was willing to let go of the Rebel XT so that I can try the 30D out.
Guess what? Same crappy photos from crappy lenses that Canon bundles together with their cameras.
Canon has so many cheap crappy lenses that you are lured to buy them.
The best lenses they got would cost you a fortune though and most of the available ones cheap at the ones without IS (image stabilization).
The 40D has very minimal advances over the 30D and I can say for sure that I don't like the 30D.
I have a friend who owns a 40D..and his photos aren't really that good even with his 70-200L IS lens!
My DA 50-200mm kit lens beats his "L" lens anytime!
Cost of his "L" lens, maybe around $400 or more.
Cost of DA 50-200mm kit lens, maybe around $130.
A lot of the shots has to do with high ISO capability and SR since if the light is just too low and you have to shoot at very low shutter speeds, then SR and the cameras high ISO capabilities go into play..and you can't beat that combo!
I own a K100D super and the K-x is so much more than than with it's really celebrated high ISO capabilties!
It has video, plus if you get the kit with the DA 55-300mm, then that lens is a lot-lot worth it!
Buy a K-x and see how your friends photos suck, and who knows when he sees your photos, you might be able to change his love for his beloved brand.
..also with a Pentax, any lens you mount becomes IS (image stabilized for Canon) since the SR is on the body and not on the lens which you have to pay for every time you buy an IS lens.