关于CMultiDocTemplate这个类的解释

关于CMultiDocTemplate 的解释

The CMultiDocTemplate class defines a document template that implements the
multiple document interface (MDI). An MDI application uses the main frame window
as a workspace in which the user can open zero or more document frame windows,
each of which displays a document.
An MDI application can support more than one type of document, and documents of
different types can be open at the same time. Your application has one document
template for each document type that it supports. For example, if your MDI
application supports both spreadsheets and text documents, the application has
two CMultiDocTemplate objects.

这个class被定义一个文档模板,用在一个多文档接口中。一个MDI使用主框架窗口作为工作空间,在这个工作空间中能打开0个或更多个
文档框架窗口,每一个子窗口展示这个文档。


一个MDI的应用程序能支持一个以上的文档类型,使不同的类型文档在相同的时间内打开。你的应用程序如果只有一个文档模板那就说明它只能支持一个文档类型举个例子,如果你的MDI同时支持表格和文本的文档的话,那么你的应用程序就有2个CMultiDocTemplate的对象。

总结:
从上面可以看出,使用了CMultiDocTemplate这个类能有的作用就是可以打开多个窗口开观察文档,不过这里的文件类型是属于同一种类型的文档。比如:如果你的程序能支持txt后缀的文件,那就说明你能打开许多许多的txt文件。如果你的application是SDI的话就算是使用了CMultiDocTemplate这个类,但是你也不能同时打开超过一个的窗口,因为他只能支持一个窗口,想打开另外的一个文档就必须关闭现在的这个。但是还要说明的就是要支持多文件的话,只能有多个文档模板,不然是不可能的。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值