将cframewnd的大小调整为所需的csplitterwnds窗格大小 [英] Resize cframewnd to the desired size of csplitterwnds panes

查看:127
本文介绍了将cframewnd的大小调整为所需的csplitterwnds窗格大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有三向静态分割的CFrameWnd;两列,右列水平分割。左列是CListView派生物。右上角和右下角视图是CFormView衍生产品。我可以计算每个窗格的大小,并在调用SetColumnInfo()/ SetRowInfo()时使用该信息。考虑到每个窗格的大小,如何在考虑菜单,标题栏,菜单栏和工具栏的情况下将CFrameWnd调整为所需的CSplitterWnds大小?



问候



我尝试过的事情:



我试过这么多事情现在很难记住它们。我已经阅读/尝试了我在这里找到的每篇文章/问题,Codeguru和StackOverflow。我尝试在CFrameWnd :: PreCreateWindow(),CFrameWnd :: OnCreateClient(),CFrameWnd :: OnSize()中更改窗格大小和窗口大小。我找不到真正的地址,我希望主分割器窗口具有我计算的固定大小以及如何调整框架窗口以具有该客户端大小。

解决方案

请看我对这个问题的评论。



这是我的建议:不要这样做。相反,创建一个漂亮的UI设计。一般来说,我不知道谁需要那些固定尺寸的窗户,特别是内部有分路器。如果某个表单中的某些内容可以调整大小,则表单应该可以调整大小,否则表单可能会让用户发疯。



-SA

I have a CFrameWnd with a three way static split; two columns with the right column being split horizontally. The left column is a CListView derivative. The top-right and bottom-right views are CFormView derivatives. I can calculate the size of each pane and I use that information in calls to SetColumnInfo()/SetRowInfo(). Given the sizes of each pane, how can one resize the CFrameWnd to the desired size of the CSplitterWnds taking into account menu, title bar, menu bar and tool bar?

Regards

What I have tried:

I have tried so many things it is hard to remember them all now. I have read/tried every article/question I have found on here, Codeguru and StackOverflow. I have tried changing pane sizes and window sizes in CFrameWnd::PreCreateWindow(), CFrameWnd::OnCreateClient(), CFrameWnd::OnSize(). Nothing I find really addresses that I want the primary splitter window to have a fixed size that I calculate and how to adjust the frame window to have that client size.

解决方案

Please see my both comments to the question.

Here is my advice: don't do it. Instead, create a nice UI design. Generally, I have no idea who ever needs those fixed-size windows, especially with splitters inside. If something is resizable inside a form, a form should be resizable, otherwise the form may just drive the users crazy.

—SA


这篇关于将cframewnd的大小调整为所需的csplitterwnds窗格大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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