如何在MFC拆分器窗口中显示更改文档? [英] How could change docs displays in MFC splitter Window?

查看:127
本文介绍了如何在MFC拆分器窗口中显示更改文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个图像查看器MFC MDI(带有一个CView和CDocument)应用程序,用于在单个应用程序窗口中显示多个图像文件(存储在PC中)以进行比较。要显示的图像数量(最多4个)及其顺序将根据用户偏好动态变化。因此,我创建了一个从CSplitterWnd派生的自定义动态拆分器窗口类,将屏幕拆分为四个窗格,并放置使用CDocument :: OnOpenDocument函数打开的四个图像文件。现在我想在运行时重新排列在分割窗格中显示的图像(具有用户首选项)。例如,有时用户可能想要将分割窗格(0,0)中的图像显示交换到窗格(1,1),反之亦然。如何以编程方式管理它以将已打开文件的数据保存在文档视图体系结构中?

是否必须为此存储已打开图像文件的CDocument或CView对象?怎么可能?

我还需要在运行时间关闭选定的窗格,并且必须存储显示在其中的图像供以后使用(可能在另一个窗格中显示)。

另外我需要在运行时动态更改分割窗格设计配置





-------- ------

| %%% | %%% |

------- | -------

| %%% | %%% |

- -------------



三个窗格(顶部窗格分为两个),





-------- ------

| %%% | %%% |

| -------------- |

| %%%%%%%< b> |

---------------





--- ----- ------

| %%% | %%% |

| ------ | %%% |

| %%% | %%% |

-------- --------







我在网上看到几个例子解释嵌套分割器的论坛,但它们使用静态分割器作为主分割器()。此外,它们仅提供完全删除拆分器列或行的选项,而不是仅删除我的应用程序所需的窗格的方法。

我是否可以仅在MFC中使用动态拆分器创建嵌套拆分器配置?

有人可以建议解决这个问题?

I'm developing an image viewer MFC MDI (with one CView and CDocument)application for displaying a number of images files(stored in PC) in single application window for comparison . The number(upto 4) of images to be showed and its order will change dynamically with user preference. So I created a custom dynamic splitter window class derived from CSplitterWnd to split the screen to four panes and placed the four image files opened using CDocument::OnOpenDocument function. Now I want to rearrange the images displaying in splitter panes (with user preferences) on running time. For example sometimes the user may want to interchange image display in splitter pane(0,0) to pane(1, 1) vice versa. How can I manage it in programmatically to keep the data of the opened files in document view architecture?
Is CDocument or CView objects of the opened image file have to be stored for this? How it possible?
I also need to close selected panes on running time and have to store the images displayed in it for later use(may be to display in another pane).
Also I need to change the splitter pane design configuration dynamically on running


-------- ------
|%%% | %%%|
-------|-------
|%%% | %%%|
---------------

three panes (top pane splitted into two),


-------- ------
|%%% | %%%|
|--------------|
|%%%%%%%|
---------------


-------- ------
|%%% | %%% |
| ------| %%% |
| %%%|%%% |
----------------



I saw few examples in online forums which explaining nested splitters, but they are using a static splitter as primary splitter(). Also they only provide option for deleting a splitter column or row entirely, not have methods for deleting a pane only which is needed for my application.
Can I create a nested splitter configuration only using dynamic splitters in MFC?
Can anyone suggest a work around for solving this issue?

推荐答案

这篇关于如何在MFC拆分器窗口中显示更改文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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