Question: Multiple Document/Single View application, how? 
Author Message
 Question: Multiple Document/Single View application, how?

Hi,

  I'm trying to create an application that would best be described as
a "Multiple Documents/Single View" application.

  The idea is something like DevStudio's "Project Settings" dialog.
It's my understanding that, in this case, each project is represented as
a document, but only a single (the settings themselves) is used for all
projects.  As you know, the settings change when you select a different
project from the treeview on the left, and if you select multiple projects
only the common settings are shown.

  I'd like to use an MDI application because it already gives me most
of the functionality that I need, but I have two question regarding MFC's
document/view architecture and MDI applications:

  1) When creating new Document (FileNew), or opening one (FileOpen),
       how do you stop it from  creating a view for that document?

  2) How do you link the new document to an existing view (which can
       then be updated with the contents of the new document).

Obviously both of these are possible because DevStudio does it, but how?

 I would really appreciate any ideas.
  -- Rolando



Mon, 20 Aug 2001 03:00:00 GMT  
 Question: Multiple Document/Single View application, how?
Rolando,

MDI implies multiple child windows. Each of these windows needs a view
object. You can create multiple document templates which all use the same
view class. Each document will have its own child window with its own view,
but they will look identical because they are created from the same window
and view class. Is this what you want?

Are you really looking for an SDI application which uses multiple documents?

--
Dave Smith
MCSE, MCT, MVP

Please post responses, I cannot reply to individual mail


Quote:
>Hi,

>  I'm trying to create an application that would best be described as
>a "Multiple Documents/Single View" application.

>  The idea is something like DevStudio's "Project Settings" dialog.
>It's my understanding that, in this case, each project is represented as
>a document, but only a single (the settings themselves) is used for all
>projects.  As you know, the settings change when you select a different
>project from the treeview on the left, and if you select multiple projects
>only the common settings are shown.

>  I'd like to use an MDI application because it already gives me most
>of the functionality that I need, but I have two question regarding MFC's
>document/view architecture and MDI applications:

>  1) When creating new Document (FileNew), or opening one (FileOpen),
>       how do you stop it from  creating a view for that document?

>  2) How do you link the new document to an existing view (which can
>       then be updated with the contents of the new document).

>Obviously both of these are possible because DevStudio does it, but how?

> I would really appreciate any ideas.
>  -- Rolando



Mon, 20 Aug 2001 03:00:00 GMT  
 Question: Multiple Document/Single View application, how?
Dave,

After a couple of responses to this question, it appears that
an SDI application with multiple documents is probably what
I want.

Someone suggested using an SDI application and overloading
the CDocument::DeleteContents() function so that instead of
deleting the document object its contents are switched.

I guess in this case it would be up to me to create some sort
of document manager (in addition to a workspace manager,
which is really why I wanted to use an MDI app.)

Again, what I really want is an application that behaves almost
exactly like DevStudio's "Project Settings" Dialog (with the
added functionality of being able to Create/Open/Save new
projects and managed them within a "workspace" that can also
be Created/Open/Save.)

  Thanks for your response,
  -- Rolando

Quote:

>Rolando,

>MDI implies multiple child windows. Each of these windows needs a view
>object. You can create multiple document templates which all use the same
>view class. Each document will have its own child window with its own view,
>but they will look identical because they are created from the same window
>and view class. Is this what you want?

>Are you really looking for an SDI application which uses multiple
documents?

>--
>Dave Smith
>MCSE, MCT, MVP

>Please post responses, I cannot reply to individual mail



>>Hi,

>>  I'm trying to create an application that would best be described as
>>a "Multiple Documents/Single View" application.

>>  The idea is something like DevStudio's "Project Settings" dialog.
>>It's my understanding that, in this case, each project is represented as
>>a document, but only a single (the settings themselves) is used for all
>>projects.  As you know, the settings change when you select a different
>>project from the treeview on the left, and if you select multiple projects
>>only the common settings are shown.

>>  I'd like to use an MDI application because it already gives me most
>>of the functionality that I need, but I have two question regarding MFC's
>>document/view architecture and MDI applications:

>>  1) When creating new Document (FileNew), or opening one (FileOpen),
>>       how do you stop it from  creating a view for that document?

>>  2) How do you link the new document to an existing view (which can
>>       then be updated with the contents of the new document).

>>Obviously both of these are possible because DevStudio does it, but how?

>> I would really appreciate any ideas.
>>  -- Rolando



Tue, 21 Aug 2001 03:00:00 GMT  
 Question: Multiple Document/Single View application, how?
Rolando:

Right now my application is SDI, but I have been considering making it MDI, in
much the way you suggest. IMO the whole MDI thing is much too much for most
applications. What I had been considering was

1. Making it MDI

2. Maximizing the MDIChild frame and getting rid of its system menu. That way
each document will look much like SDI.

3. Getting rid of most of the items on the Window menu.

Then different documents have different instances of the same view, but does
this really matter.

If you stick with SDI and a self-maintained list of documents, then won't you
have trouble with saving all the modified documents when the application closes?

David Wilkinson

=================

Quote:

> Dave,

> After a couple of responses to this question, it appears that
> an SDI application with multiple documents is probably what
> I want.

> Someone suggested using an SDI application and overloading
> the CDocument::DeleteContents() function so that instead of
> deleting the document object its contents are switched.

> I guess in this case it would be up to me to create some sort
> of document manager (in addition to a workspace manager,
> which is really why I wanted to use an MDI app.)

> Again, what I really want is an application that behaves almost
> exactly like DevStudio's "Project Settings" Dialog (with the
> added functionality of being able to Create/Open/Save new
> projects and managed them within a "workspace" that can also
> be Created/Open/Save.)

>   Thanks for your response,
>   -- Rolando


> >Rolando,

> >MDI implies multiple child windows. Each of these windows needs a view
> >object. You can create multiple document templates which all use the same
> >view class. Each document will have its own child window with its own view,
> >but they will look identical because they are created from the same window
> >and view class. Is this what you want?

> >Are you really looking for an SDI application which uses multiple
> documents?

> >--
> >Dave Smith
> >MCSE, MCT, MVP

> >Please post responses, I cannot reply to individual mail



> >>Hi,

> >>  I'm trying to create an application that would best be described as
> >>a "Multiple Documents/Single View" application.

> >>  The idea is something like DevStudio's "Project Settings" dialog.
> >>It's my understanding that, in this case, each project is represented as
> >>a document, but only a single (the settings themselves) is used for all
> >>projects.  As you know, the settings change when you select a different
> >>project from the treeview on the left, and if you select multiple projects
> >>only the common settings are shown.

> >>  I'd like to use an MDI application because it already gives me most
> >>of the functionality that I need, but I have two question regarding MFC's
> >>document/view architecture and MDI applications:

> >>  1) When creating new Document (FileNew), or opening one (FileOpen),
> >>       how do you stop it from  creating a view for that document?

> >>  2) How do you link the new document to an existing view (which can
> >>       then be updated with the contents of the new document).

> >>Obviously both of these are possible because DevStudio does it, but how?

> >> I would really appreciate any ideas.
> >>  -- Rolando



Tue, 21 Aug 2001 03:00:00 GMT  
 Question: Multiple Document/Single View application, how?
I've thought about doing what you suggested, but in this case it does
matter if there are multiple views because what happens when the
user selects multiple projects from the workspace to set COMMON
settings?  Which view do I update?  I guess the active one, but it
would make more sense if I only have one view.

If I make the app MDI I need I way to either *NOT* create a view/frame
for new documents, or a dummy view/frame which I can hide (although
this is really a waste!!!).

I really want to find out how DevStudio does it.  For example, when you
go to the FileNew, and create a new PROJECT, the application does
not create a window for the project, it simply adds the project to the
workspace.  How is that done?  Do they simply turn off the bVisible flag
when calling CDocument::OpenDocumentFile()?

  Thanks for the reply,
  -- Rolando

Quote:

>Rolando:

>Right now my application is SDI, but I have been considering making it MDI,
in
>much the way you suggest. IMO the whole MDI thing is much too much for most
>applications. What I had been considering was

>1. Making it MDI

>2. Maximizing the MDIChild frame and getting rid of its system menu. That
way
>each document will look much like SDI.

>3. Getting rid of most of the items on the Window menu.

>Then different documents have different instances of the same view, but
does
>this really matter.

>If you stick with SDI and a self-maintained list of documents, then won't
you
>have trouble with saving all the modified documents when the application
closes?

>David Wilkinson

>=================


>> Dave,

>> After a couple of responses to this question, it appears that
>> an SDI application with multiple documents is probably what
>> I want.

>> Someone suggested using an SDI application and overloading
>> the CDocument::DeleteContents() function so that instead of
>> deleting the document object its contents are switched.

>> I guess in this case it would be up to me to create some sort
>> of document manager (in addition to a workspace manager,
>> which is really why I wanted to use an MDI app.)

>> Again, what I really want is an application that behaves almost
>> exactly like DevStudio's "Project Settings" Dialog (with the
>> added functionality of being able to Create/Open/Save new
>> projects and managed them within a "workspace" that can also
>> be Created/Open/Save.)

>>   Thanks for your response,
>>   -- Rolando


>> >Rolando,

>> >MDI implies multiple child windows. Each of these windows needs a view
>> >object. You can create multiple document templates which all use the
same
>> >view class. Each document will have its own child window with its own
view,
>> >but they will look identical because they are created from the same
window
>> >and view class. Is this what you want?

>> >Are you really looking for an SDI application which uses multiple
>> documents?

>> >--
>> >Dave Smith
>> >MCSE, MCT, MVP

>> >Please post responses, I cannot reply to individual mail



>> >>Hi,

>> >>  I'm trying to create an application that would best be described as
>> >>a "Multiple Documents/Single View" application.

>> >>  The idea is something like DevStudio's "Project Settings" dialog.
>> >>It's my understanding that, in this case, each project is represented
as
>> >>a document, but only a single (the settings themselves) is used for all
>> >>projects.  As you know, the settings change when you select a different
>> >>project from the treeview on the left, and if you select multiple
projects
>> >>only the common settings are shown.

>> >>  I'd like to use an MDI application because it already gives me most
>> >>of the functionality that I need, but I have two question regarding
MFC's
>> >>document/view architecture and MDI applications:

>> >>  1) When creating new Document (FileNew), or opening one (FileOpen),
>> >>       how do you stop it from  creating a view for that document?

>> >>  2) How do you link the new document to an existing view (which can
>> >>       then be updated with the contents of the new document).

>> >>Obviously both of these are possible because DevStudio does it, but
how?

>> >> I would really appreciate any ideas.
>> >>  -- Rolando



Tue, 21 Aug 2001 03:00:00 GMT  
 Question: Multiple Document/Single View application, how?
One Doc can have many views representing it ,
but one view can be associated with one doc only . so you can't do what you
are aiming for


Quote:
>Hi,

>  I'm trying to create an application that would best be described as
>a "Multiple Documents/Single View" application.

>  The idea is something like DevStudio's "Project Settings" dialog.
>It's my understanding that, in this case, each project is represented as
>a document, but only a single (the settings themselves) is used for all
>projects.  As you know, the settings change when you select a different
>project from the treeview on the left, and if you select multiple projects
>only the common settings are shown.

>  I'd like to use an MDI application because it already gives me most
>of the functionality that I need, but I have two question regarding MFC's
>document/view architecture and MDI applications:

>  1) When creating new Document (FileNew), or opening one (FileOpen),
>       how do you stop it from  creating a view for that document?

>  2) How do you link the new document to an existing view (which can
>       then be updated with the contents of the new document).

>Obviously both of these are possible because DevStudio does it, but how?

> I would really appreciate any ideas.
>  -- Rolando



Sat, 08 Sep 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Question: Multiple Document/Single View application, how?

2. Single document, multiple view application?

3. Single Document with Multiple Views in an SDI Application

4. Single Document// multiple views// multiple frames

5. Multiple views for a single document

6. Multiple views for a single document - back to the future

7. Multiple Views in a single document

8. MDI Multiple Views, Single Document

9. Multiple views for a single document

10. Single Document / file extension, multiple views in MDI

11. Multiple different views on a single document

12. Multiple Views with Single document window

 

 
Powered by phpBB® Forum Software