各位:
我想用windows的api判断一个点是否在一个rgn内。好像有个这个的函数ptinrgn(),但是我找了很多地方都找不到这个函数的参数细节。是不是这个函数只在mfc里面才实现了???如果哪位知道麻烦把这个函数的具体细节(主要是如何传递参数)告诉我好吗?
麻烦各位给小弟一个解决方法好吗?多谢 多谢!
我想用windows的api判断一个点是否在一个rgn内。好像有个这个的函数ptinrgn(),但是我找了很多地方都找不到这个函数的参数细节。是不是这个函数只在mfc里面才实现了???如果哪位知道麻烦把这个函数的具体细节(主要是如何传递参数)告诉我好吗?
麻烦各位给小弟一个解决方法好吗?多谢 多谢!
解决方案 »
- VC绘图只能是黑白的吗?
- 高分请教高手问题,关于串行化。。。。。。
- 淡月儿请进,200分相送~~~~~~~~~~~~~~~~~~
- CList的结点可以是结构吗?代码怎样写?
- excel文件存取的困惑,高分求解
- 求光盘下载网址
- 这里有3个问题,共300分,现在320分征求USB程序和端口通信方面的资料,你所做的仅仅是留下资料连接,或mail me.然后在其他问题地方签下大
- 看看有………………奖……………………………………啊!!!!!!!!!!!!!!
- 菜鸟问题??如何在vc下实现类似vb的filelist, 对话框
- 我用CDC::InvertRect在窗体的客户区填充了几个矩形,但以改变窗体的大小,那几个矩形就不见了,这是怎么回事?
- 关于LNK2001: unresolved external symbol错误
- 大家现在都用什么杀毒软件?进来谈谈!
HRGN hrgn, // handle to region
int X, // x-coordinate of point
int Y // y-coordinate of point
);windows api函数
PtInRegion
The PtInRegion function determines whether the specified point is inside the specified region. BOOL PtInRegion(
HRGN hrgn, // handle to region
int X, // x-coordinate of point
int Y // y-coordinate of point
);
Parameters
hrgn
[in] Handle to the region to be examined.
X
[in] Specifies the x-coordinate of the point in logical units.
Y
[in] Specifies the y-coordinate of the point in logical units.
Return Values
If the specified point is in the region, the return value is nonzero.If the specified point is not in the region, the return value is zero.
BOOL PtInRegion(int x, int y) const
{
ATLASSERT(m_hRgn != NULL);
return ::PtInRegion(m_hRgn, x, y);
}