rect.PtInRect是什么意思
CRect rect(5, 5, 100, 100);
CPoint pt1(35, 50);
if(!rect.PtInRect(pt1));
我的理解。是不是判断。pt1(35,50)这个点是否在矩形(5,5,100,100)里面?
不知道我理解的对不对,我不是很明白
[此贴子已经被作者于2006-11-4 0:16:30编辑过]
是的!
BOOL PtInRect( POINT point ) const;
Return Value
Nonzero if the point lies within CRect; otherwise 0.
Parameters
point
Contains a POINT structure or CPoint object.
Remarks
Determines whether the specified point lies within CRect. A point is within CRect if it lies on the left or top side or is within all four sides. A point on the right or bottom side is outside CRect.