Min Wang
April 26th, 1999, 06:32 AM
In OnLButtonDown(...) I got CPoint p1.
In OnMouseMove(...) I got CPoint p2.
Then I have a rect CRect rect(p1.x,p1.y,p2.x,p2.y).
I think the size of rect should be:
width=p2.x-p1.x+1
height=p2.y-p1.y+1
but rect.Width()=p2.x-p1.x while rect.Height()=p2.y-p1.y
What's the problem?
If I want to get the bitmap covered by the rect,
what about the size of bitmap? rect.Height() or
rect.Height()+1? The start point and end point of
bitmap?
Thanks,
In OnMouseMove(...) I got CPoint p2.
Then I have a rect CRect rect(p1.x,p1.y,p2.x,p2.y).
I think the size of rect should be:
width=p2.x-p1.x+1
height=p2.y-p1.y+1
but rect.Width()=p2.x-p1.x while rect.Height()=p2.y-p1.y
What's the problem?
If I want to get the bitmap covered by the rect,
what about the size of bitmap? rect.Height() or
rect.Height()+1? The start point and end point of
bitmap?
Thanks,