限制对话框位于应用程序边界内 [英] Restrict Dialog Box to be within Application Boundaries
本文介绍了限制对话框位于应用程序边界内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友,
我对所有人都有一个有趣的问题.
我如何限制对话框(模态或无模态)以保留在
之内
应用程序边界?
它的行为应类似于CView子对象,但不这样做
走出应用程序的界限.
我知道我们可以使用OnMove(..)事件处理来做到这一点.
但是,我想知道是否还有其他直接手段
例如通过将某些属性设置为CDialog类.
请帮我解决一下这个. :)
问候,
K ARUN KUMAR
Hi Friends,
I have an interesting question for all.
How can i restrict a dialog box(Modal or modeless) to stay within the
application boundaries?
It should behave just like a CView child object which do not
go out of application boundaries.
I know we can do it with OnMove(..) event handling.
But, i wanted to know whether there are any other direct means
like by setting some properties to CDialog class.
Please help me with this. :)
Regards,
K ARUN KUMAR
推荐答案
您可能会发现此 DavidCrow 的文章[
You may find this DavidCrow''s article [^] helpful.
:)
使用OnMoving(..)事件处理解决方案..
这是链接
http://www.codeproject.com/Messages/3461670/Re-How-To-Restrict-Dialog-Box-in-an-SDI-to-be-With.aspx
Got the solution with OnMoving(..) event handling..
Here is the link
http://www.codeproject.com/Messages/3461670/Re-How-To-Restrict-Dialog-Box-in-an-SDI-to-be-With.aspx
将MessageBox限制为通过
调用窗体Boundry 1.设置光标相对于msgBox的位置
2.在表格mouse_move上将光标的位置与调用表格边界进行比较,并在边界之后停止更改位置:)
restrict MessageBox to calling form Boundry by
1. set cursor location relative to msgBox
2.on form mouse_move compare location of cursor to calling form boundries and stop changing location after boundries :)
这篇关于限制对话框位于应用程序边界内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文