In Visual C++, how do I create multiple views in a single document interface ?


  In my program, i have to display a single data set in 4 views(child windows). please help

regards
srikanth
cbodapatiAsked:
Who is Participating?
 
Nass89Connect With a Mentor Commented:
Hi,
You may add/ remove views using:   CDocument::AddView()  or
 Document::RemoveView().

You may have a handler of your document class invoked by a menu entry or a toolbar button (or both). Then you create a  new view and remove the old and add the new. To show the view use ShowWindow(SW_SHOW).

Good Luck!
0
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
look at the chkbook example - two (different) views on one document displayed at the same time.

      http://msdn.microsoft.com/library/en-us/vcsample/html/_sample_mfc_CHKBOOK.asp

     {{link added -- DanRollins/ EE PE}}
0
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
0
 
cbodapatiAuthor Commented:
thanks all
  I have gone through the above links.
   Mr.andy,
     I want to display 3 views simultanously from 1 doc,
   how to go about it in a better manner.
  please help.
 

regards
srikanth
     
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Follow the chkbook example but create a third view as well.
(Do you not understand a part of what the multiple view creation there is doing?)
0
All Courses

From novice to tech pro — start learning today.