Doc/view architecture in tabbed app
Paul B -- Paul.B.Folbrecht@JCI.Com
Monday, March 17, 1997
Environment: VC++ 4.1, Win95/NT 4.0
I am working on an application with a tabbed motif that can't really
be catagorized as either SDI or MDI. There is a tab control in the
main window that partitions the app into workspaces that are largely
autonomous.
Right now, I am using the doc/view architecture to some limited
extent. The base workspace class is derived from CView, and there is
a single document object, which is created by the default AppWizard
SDI code.
I am finding that it would be advantageous (and logical) for there to
be a separate document object associated with each workspace. My
question is: what' the best way to do this? Can I just derive a new
document class for each workspace, instantiate it, and attach it to
the workspace by setting its m_pDocument member? Or should I use a
CDocTemplate or derivitive? I have a feeling the framework might not
be happy with the first, simpler approach.
-Paul Folbrecht
Compuware Corp.
Dave Kolb -- sasdxk@wnt.sas.com
Friday, March 21, 1997
Checkout http://www.stingsoft.com for their Objective Toolkit samples.
This might give you what you're looking for. I don't use OT but do use
their Objective Grid stuff and like it.
Dave Kolb
SAS Institute
>-----Original Message-----
>From: Folbrecht, Paul B [SMTP:Paul.B.Folbrecht@JCI.Com]
>Sent: Monday, March 17, 1997 12:53 PM
>To: mfc-l@netcom.com
>Subject: Doc/view architecture in tabbed app
>
>
>
>
>
>
>
> Environment: VC++ 4.1, Win95/NT 4.0
>
> I am working on an application with a tabbed motif that can't really
> be catagorized as either SDI or MDI. There is a tab control in the
> main window that partitions the app into workspaces that are largely
> autonomous.
>
> Right now, I am using the doc/view architecture to some limited
> extent. The base workspace class is derived from CView, and there is
> a single document object, which is created by the default AppWizard
> SDI code.
>
> I am finding that it would be advantageous (and logical) for there to
> be a separate document object associated with each workspace. My
> question is: what' the best way to do this? Can I just derive a new
> document class for each workspace, instantiate it, and attach it to
> the workspace by setting its m_pDocument member? Or should I use a
> CDocTemplate or derivitive? I have a feeling the framework might not
> be happy with the first, simpler approach.
>
> -Paul Folbrecht
> Compuware Corp.
>
>
DFPav@aol.com
Monday, March 24, 1997
In a message dated 97-03-20 22:36:38 EST, you write:
> Environment: VC++ 4.1, Win95/NT 4.0
>
> I am working on an application with a tabbed motif that can't really
> be catagorized as either SDI or MDI. There is a tab control in the
> main window that partitions the app into workspaces that are largely
> autonomous.
>
Are these workspaces to be stored in the same or different files (ie.
documents)?
> Right now, I am using the doc/view architecture to some limited
> extent. The base workspace class is derived from CView, and there is
> a single document object, which is created by the default AppWizard
> SDI code.
It sounds as if each workspace should have its own view.
>
> I am finding that it would be advantageous (and logical) for there to
> be a separate document object associated with each workspace. My
> question is: what' the best way to do this? Can I just derive a new
> document class for each workspace, instantiate it, and attach it to
> the workspace by setting its m_pDocument member? Or should I use a
> CDocTemplate or derivitive? I have a feeling the framework might not
> be happy with the first, simpler approach.
if each workspace has its own document and its own view (either its own view
class or different instances of the same class) then why not have several
document templates associating each document type with its view.
>
> -Paul Folbrecht
> Compuware Corp.
>
>
Hope this helps a little,
Dan
Become an MFC-L member
| Вернуться в корень Архива
|