基于对话框的应用 [英] dialog based application
本文介绍了基于对话框的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我在基于对话框的MFC应用程序中从父窗口进行domodal时,如何使子窗口无法移动?
有人可以建议我,谢谢提前。
How can I make a child window unmovable when I domodal from the parent window in a dialog based MFC application??
Can someone please suggest me, thanks in advance.
推荐答案
为防止窗口移动,您可以为WM_WINDOWPOSCHANGING
消息实现处理程序并修改WINDOWPOS
结构中的标志设置SWP_NOMOVE
标志,以便忽略x,y位置。
有关详细信息,请参阅此处: http://msdn.microsoft.com/en-us/library/ms632653(v = vs.85).aspx [ ^ ]
To prevent the windows from moving, you can implement a handler for theWM_WINDOWPOSCHANGING
message and modify the flags in theWINDOWPOS
structure to set theSWP_NOMOVE
flag so the x, y position is ignored.
See here for more details: http://msdn.microsoft.com/en-us/library/ms632653(v=vs.85).aspx[^]
这篇关于基于对话框的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文