Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-18
7
Medium Priority
?
286 Views
Last Modified: 2013-11-20

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

regards
srikanth
0
Comment
Question by:cbodapati
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Accepted Solution

by:
Nass89 earned 172 total points
ID: 11838643
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
 
LVL 45

Assisted Solution

by:AndyAinscow
AndyAinscow earned 164 total points
ID: 11838720
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
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 164 total points
ID: 11870087
0
 

Author Comment

by:cbodapati
ID: 11900262
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
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 11900296
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question