MFC SDI同时多视图 [英] MFC SDI Simultaneous Multiple Views

查看:83
本文介绍了MFC SDI同时多视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!所以,标题基本上解释了它!

我正在使用微软基础类(MFC)上的地图编辑器,我使用了一个向导,等等等等等等等等等等等等等等等等等等等等到目前为止,一切都很顺利!

我真正想要做的是制作一个具有不同视图的分割窗口

以便一个视图是我的地图而另一个视图是另一个视图是我的资源(就像RPG Maker那样)



我查了这样的教程:

http://www.codeproject.com / Articles / 15338 / SDI-with-split-window



但是,我现在看的是几个对话框,而不是视图。我很确定对话框的使用方式与视图不同,尽管它们共享一个CView父级。我希望能够在我的客户端正常绘制。



我还找到了切换视图的教程,也不是我正在寻找的ahaha。





视觉上,这是我正在寻找的简约模型:

http:// imageshack .us / a / img543 / 811 / gmhp.png

Hello! So, the title basically explains it!
I am working on a map editor on Microsoft's Foundation Class (MFC), I used a wizard, blah blah blah SDT, blah blah blah.....so far, everything is going perfectly!
What I really want to do, however is to make a split window with different views
so that one view is my map and the other is my resources (like RPG Maker does it)

I looked up tutorials like this:
http://www.codeproject.com/Articles/15338/SDI-with-split-window

However, what I'm looking at now is a couple of dialog boxes, not views. I'm pretty sure dialog boxes are used differently from views, although they do share a CView parent. I want to be able to draw normally on my client.

I also found tutorials for switching views, also not what I'm looking for ahaha.


So visually, this is a minimalistic mock-up of what I am looking for:
http://imageshack.us/a/img543/811/gmhp.png

推荐答案

MFC已经有 CSplitterWnd class [ ^ ],用于此目的。
MFC already has the CSplitterWnd class[^], for this exact purpose.


您可以使用CSplitterWnd或将应用程序从SDI(或对话框)更改为MDI。每个都有很多例子,Google应该为您提供大量的建议和示例代码。
You can either use CSplitterWnd or change your application from SDI (or dialog) to MDI. There are numerous examples of each and Google should find you a plethora of advice and sample code.


这篇关于MFC SDI同时多视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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