I'll assume that you are using a crop body, so that would mean the 10-22 mm lens is your choice in an Ultra Wide. The crop factor will make it act like a 16-35. The 17-40 was originally designed as a full frame Ultra Wide but on a crop body it acts like a 27-64 mm lens, which is considered wide angle through a bit longer than normal. If you aren't using a crop body the 10-22 mm lens won't fit.
I have 10-22 EFs and love it for cropped sensor Canons.
It will not fit Full Frame body such as my 5D or 1Ds so I miss it there. That is why I have added Tokina 11-16mm that though is made also for cropped sensor, can physically seat on FF bodies and gives a good image even at 15mm considering that lens is very sharp corner to corner even at full F2.8 stop that is phenomenal in class. If you go shorter that this on FF, you get circular fishish eye appearance that doesn't bother me (Easily cropped at pp or not get there in first place).