组合Rgn不工作
我有两个区域:rgn1
和 rgn2
。我想使用CombineRgn 函数将它们组合起来。所以我写 -
if CombineRgn(rgnMain,rgn1,rgn2,RGN_OR) = error then
ShowMessage('error');
它给出的返回值是错误的。
我已经测试过 rgn1 和 rgn2 是正确的区域。
谢谢。
I have two region say rgn1
and rgn2
. I wanted to combine both of them using CombineRgn function. So I write -
if CombineRgn(rgnMain,rgn1,rgn2,RGN_OR) = error then
ShowMessage('error');
Its giving return value as ERROR.
I have tested that rgn1 and rgn2 are correct region.
Thank You.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还初始化了rgnMain吗?有点违反直觉(但如 CombineRgn() 文档中所述)目标/输出区域必须存在才能接收两个输入区域的所需组合,但它可以是一个完全空的区域:
如果您希望避免创建一个完全独立的区域,那么指定以下之一是可以接受的输入区域作为目标区域(根据定义,输入区域必须是现有的有效区域,这样就避免了必须单独初始化新的目标区域):
Have you also initialised rgnMain? Somewhat counterintuitively (but as described in the documentation for CombineRgn()) the destination/output region must exist in order to receive the required combination of the two input regions, but it can be an entirely empty region:
If you wish to avoid having to create an entirely separate region then it is acceptable and possible to specify one of the input regions as the destination region (by definition an input region must be an existing, valid region so this avoids having to separately initialise a new destination region):