在C++ MFC中Single document和Dialog based有什么具体的区别?

csdn 回答

在我个人看来有两个区别

1,SDI比dialog based有更丰富的默认窗体,比如,默认的菜单,
2,SDI有document-view的代码结构,而DIALOG based没有这个D-V结构
总结一下就是,DIALOG BASED趋向于做任务非常单一的小程序,所有的任务可以在一个窗体完成的
而SDI会复杂一点
但是界限不明显,因为DIALOG BASED也可以做成非常复杂的窗体

只是SDI默认就多了一些支持


stackoverflow回答:

http://stackoverflow.com/questions/660843/choosing-between-a-dialog-based-vs-sdi-projects

If you select an SDI project you get a whole Model-View-Controller framework included. You get a document class (inheriting from CDocument) which ideally should hold all of the data, and a view class (inheriting from CView) to do with the display. You get given a hosting frame with a menu already attached, and there are functions you can override to save and load to file.

If you have a dialog based application, then you get one dialog. That's it. Of course, this dialog can spawn off others, but the application essentially consists of a dialog.

If you're developing a small application that just does one task, a dialog application is appropriate, because you don't need the overhead.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值