MFC Multiple document types in SDI application
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, I'm using multiple document types (e.g. *.txt, *.xml) in a SDI type application, with two
CSingleDocTemplate
objects that handles two different file formats. The view class is the same for both document templates. However, when opening a file of the type that isn't currently open, MFC creates a new top level frame instead of disposing of the old view. This happens inCSingleDocTemplate::OpenDocumentFile
, but I'm not that happy about overriding stuff about the view/doc logic of MFC. What I want is to keep the same frame for both document types, but from what I can read in the MFC source, the framework isn't really designed for that behaviour. Anyone with some experience of this?