app with no document
08-Jul-94 17:27:28
Sb: #29809-app with no document
Fm: Jay Potter [MSFT] 74441,173
To: Marc Weigel 72103,1013
Marc,
> Is it possible to have an application that supports
> views but does not have any documents. I am using
> AppWizard to create a basic SDI application, but it
> has alot of stuff in it that looks like it is for
> document support. What do I do to get rid of all
> of this unneeded support – including the title bar
> of the SDI frame – which always has the name of the
> current document in it? I would like to simply have the
> name of the application in the main frame window.
Yes it is possible but not recommended. Steve is correct when he says
that documents are an integral part of the MFC framework. Does your
application have any data? If so you can probably use the Doc/View
architecture effectively. Documents are just data stores. Views just
display the data in a certain format.
Probably the easiest thing is to do as Steve suggested and remove the
FWS_ADDTOTITLE flag in your PreCreateWindow for your CMainFrame object.
That will keep the title from changing which should be the only outward
indication of a document's presence.
I highly recommend you use the document in conjunction with the view.
Although possible, creating a view is not really the supported approach.
Hope his helps!
Jay Potter
Microsoft Developer Support