0
votes

How to make my MFC application support multiple document types like MS Office and Visual Studio, When you click new file a window with all types supported will appear to choose from it and then open the appropriate document/view. I'm not Experienced in MFC Document/View architecture. most of books I've read don't cover this part. they all are the same on the Document/View they cover the basics with drawing some triangles, circles, squares. I want to master the mfc document/view architecture, what is the best book or tutorial for that?

Another thing is How to Create an MDI application that don't support the document/view and [it has no deal with documents] it deals with database for example the mdi childs are forms with controls , how to do that in C# it was easy set the parent as mdi parent and the mdi child, show, it will appear normally how this can be achieved in mfc? what type of dialog to use.

1

1 Answers

1
votes

There's no magic involved, just a lot of work. If you want to support document types X, Y and Z, you need to figure out which models you need to represent them. Similar document types may share similar models. E.g. in Visual Studio, a VB.Net solution and a C# solution may share the same model, since both are .Net solutions. Yet native C++ may require a different model. (Remember that models, being classes, can inherit from base classes, so you can effectively share similar code).