mfc >> multiple view single document

by fordge » Thu, 08 Jul 2004 18:23:14 GMT

Could some out point out to me how i can make a multiple view single doc
suppose i have 2 view and want to use the same CDocument

could anyone give me pointers


mfc >> multiple view single document

by Scott McPhillips [MVP] » Thu, 08 Jul 2004 19:52:29 GMT

If you want both views visible use CSplitterWnd. If you want to switch
from one view to the other see the VSWAP32 sample.

Scott McPhillips [VC++ MVP]

mfc >> multiple view single document

by Joseph M. Newcomer » Fri, 09 Jul 2004 08:41:39 GMT

If you want to see multiple views at the same time, the splitter window solution already
suggested can work. I've also done it as MDI and simply removed the ability to open
multiple documents. A bit tricky, but it turned out to be exactly what the client wanted.

Joseph M. Newcomer [MVP]
MVP Tips:

mfc >> multiple view single document

by PinHead » Fri, 09 Jul 2004 11:35:36 GMT

First look here (Great Example):

or here (little less detail) ://

and here

Hope that helps,

mfc >> multiple view single document

by fordge » Fri, 09 Jul 2004 13:39:17 GMT

Thankx pinhead u r link was really useful..
though SDI view switching doesnt solve my issue

also i had seen the CSplitterWnd examples in msdn earlier..
but splitterWnd doesnt work for my UI and i need 2 independent windows

the magic of CSplitterWnd is the usage of the pDoc->UpdateAllViews function.

here the document contains a list of all views associated to it.

If using SplitterWnd this happens automatically and all the subviews are
added to this list automatically.

Then if data is changed in one view all we do is call the UpdateAllViews..

I was wondering how this could be achieved???

I solved my problem temporarily by creating a Document object in the app

And whenever the views call GetDocument()

i just send them the

works like turtles in penut butter ;))which means its ok

SY ://

Similar Threads

1. Multiple views Single Document MDI - no splitter views

2. looking for sample:multiple view single document in C# or VB

I am looking for sample of an application similar to outlook regarding UI

when user select a tree node in the left pane a view is changed in the right

(it does not necessarily support  MFC doc view architecture )

thanks in advance

3. Multiple views Single Document MDI

4. Creating Multiple Splitter Views in a Single Document MFC project

I have created a new MFC project, with the application type being
"single document" type. While I have been able to create 4 views as
well as 2 views with ease, I have had a lot of trouble creating
splitters for 3 views. Is there any easy way of creating 3 views in
this type of MFC project? Thanks.

5. Multiple Views: how to open both views at startup or on new document

6. Merging two single document view applications possibly using a DLL

I have two single document view MFC applications.  One of them is a
general system test tool and the other is a device configuration tool.
Both of them are designed to be stand alone programs.  I want to be
able to integrate the configuration tool into the test tool in such a
way that any changes to the configuration tool could be dropped into
the test tool relatively quickly.  My first thought was to recompile
the configuration tool as a MFC extension DLL and export the CWinApp
class and call it.  Some experimentation and foruming have discouraged
me on the feasibility of this idea.

Can anyone point me in the right direction for either getting it to
work as a DLL or an alternative method?

7. How to have a form type window in MFC Single Document view window

8. Split Multiple XML Documents from a Single File