I am trying to move an object on top of another object in a view window. I am positioning the second object based on the coordinates returned by GetWindowRect() of the first object. This works fine when the manin view is maximized, however when the view is made smaller so that scroll bars appear, the GetWindowRect() coordinates do not seem to be right. When I try to put the second object to a position of
object1rect.top (which is of CRect type) they do not match up. How can get an accurate position of the first object to determine where to put the second?