$ 0 0 That code is doing what you want...but it could be done more simply by just calling:range.InitFrom(pt1, pt2);