CDialogBar:当停靠在左侧时移动内容(窗口) [英] CDialogBar: moves content (windows) when docked at left side

查看:136
本文介绍了CDialogBar:当停靠在左侧时移动内容(窗口)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个关于CDialogBar(:CControlBar)的问题。



我是一个MDI应用程序可停靠的工具箱(CDialogBar)。

用户可以/允许移动DialogBar并将其停靠在右侧或左侧





当我停靠在左侧时,mdi-application(所有打开的窗口)的内容都向右移动(因此可停靠栏移动窗口)。



如果我停靠在右侧,没有任何变化。





我怎样才能改变行为酒吧,当我停靠时,应用程序内的窗口保持相同的位置??







(问题是,我的窗口在应用程序的右侧对齐)。当我把酒吧停靠在左边时,窗户会在不可见的区域移动。)







提前感谢你的帮助

Hi
I have a question concerning the CDialogBar (:CControlBar).

I habe a MDI application with a dockable toolbox (CDialogBar).
The user is able/allowed to move the DialogBar and to dock it at the right or left side


When I dock at the left side, the content of the mdi-application (all open windows) are moved right (so the dockable bar moves the windows).

If i dock at the right side, nothing changes.


How can I change the behaviour of the bar, that the windows inside the application keep the same position when I dock left ??



(Problem is, that my windows are aligned on the right side of the application). When I dock the bar on the left, the windows are getting moved in the not visible area.)



Thanks in advance fpr your help

推荐答案

据我所知,这是MFC如何设计的问题。对接的想法是避免将窗口的任何部分隐藏在对接窗口下方。当您停靠在右侧时,预期的行为将减少窗口的宽度,以便为停靠的窗口腾出空间。



你可能想尝试一件事:将主窗口的RightToLeft属性更改为TRUE。
To the best of my knowledge, this is a matter of how MFC is designed. The idea of docking is avoiding hiding any portion of the window underneath the docked windows. When you dock to the right side, the expected behavior would be reducing the widths of the window to make room for the docked window.

You might want to try one thing: change the RightToLeft attribute of the main window to TRUE.


感谢您的回答。



是的,这是设计:(



但我可以自己解决:我在对接后纠正窗口的位置。
Thanks for your answer.

Yes, this is by design :(

But I could solve it myself: I correct the window''s position after docking.


这篇关于CDialogBar:当停靠在左侧时移动内容(窗口)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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