基于对话框的应用 [英] dialog based application

查看:55
本文介绍了基于对话框的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在基于对话框的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 the WM_WINDOWPOSCHANGING message and modify the flags in the WINDOWPOS structure to set the SWP_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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆