MFC:将两个窗口/对话框“粘合"在一起 [英] MFC: 'Gluing' two windows/dialogs together

查看:185
本文介绍了MFC:将两个窗口/对话框“粘合"在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进行设置,以便我的主对话框具有一个或多个子对话框,并且将它们粘贴/固定在主对话框的外部上-当主对话框最小化时,孩子们也一样,当主对话框移动时,孩子们也随之移动.

I'm trying to set something up so my main dialog has one or more child dialogs, and these are glued/docked to the outside of the main dialog - when the main dialog is minimised, the children are too, when main dialog moves, children move with it.

我尝试将子对话框设置为以CHILD样式将主对话框CWnd设置为父对话框.但是随后,它们被父母的边界所限制.如果我将它们设置为POPUP,则它们可以在外面,但不要随父一起移动.

I'd tried setting child dialogs as having main dialog CWnd as parent, with CHILD style. But then they get clipped by the parent's boundary. If I set them as POPUP, they can be outside but then don't move with the parent.

我正在考虑在父对话框上放置一个OnMove处理程序,但是有内置的东西吗?而且,子对话框应该仍然是主对话框的子对话框吗...我想他们应该吗?

I'm looking at putting an OnMove handler on the parent dialog, but is there something built-in? And, should child dialogs still be children of the main dialog... I assume they should?

这是VS2005(我认为VS2008具有一些相关功能,因此我在此提及).

This is VS2005 (I think VS2008 has some related functionality so I mention this).

推荐答案

您需要在弹出式窗口中手动实现移动,是的,它们应该是弹出式窗口,否则将被剪切掉.

You need to implement the movement manually when they are popups, and yes they should be popups otherwise they will be clipped out.

这篇关于MFC:将两个窗口/对话框“粘合"在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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