且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在没有显示视图的情况下打开/未打开文档时出现不同的菜单问题?

更新时间:2023-08-30 09:10:34

一次只能打开一个文档,还是支持多个文档?如果多个,那么他们都会使用相同的文档模板吗?如果这两个(使用相同文档模板的多个文档)都为真,则描述MDI
体系结构。开发人员经常将MDI用于多个窗口,但MDI不是为此而设计的,但如果您有多个文档使用相同的模板,那么它可能是MDI的理想用途。 MDI支持切换菜单等内容。

Will there be only one document open at a time or will you support multiple documents? If multiple then will they all use the same document template? If both of those (multiple documents using the same document template) are true then that describes a MDI architecture. Developers often use MDI for multiple windows but MDI is not designed for that but if you have multiple documents using the same template then it is probably an ideal use of MDI. MDI has support of things like switching the menu.

如果您想一次只支持一个文档,请不要使用MDI。还有其他解决方案,但我需要参考文档来提醒我MFC是如何工作的。几年前我做过它,但已经有几年了。

If you want to support only one document at a time then don't use MDI. There are other solutions available but I need to refer to the documentation to remind me how MFC works. I did work with it a few years ago but it has been a few years.