| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2749 人关注过本帖
标题:rect.PtInRect是什么意思
只看楼主 加入收藏
particle
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-10-25
收藏
 问题点数:0 回复次数:1 
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编辑过]

搜索更多相关主题的帖子: PtInRect rect 
2006-11-04 00:08
a_mysky
Rank: 1
等 级:新手上路
帖 子:34
专家分:0
注 册:2006-9-13
收藏
得分:0 

是的!
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.


2006-11-04 09:11
快速回复:rect.PtInRect是什么意思
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017855 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved