Solved

Two View files

Posted on 1998-06-24
3
184 Views
Last Modified: 2013-11-20
Can you have two view files in a project like "CMyappView" and "CMyapp1view". If yes, How do you create them?
How do you link them ?
0
Comment
Question by:sram
[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
3 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1318386
Two views are created when you use splitter window. Both viewes are attached to the same document.
0
 
LVL 1

Accepted Solution

by:
guruprasad031298 earned 50 total points
ID: 1318387
You can have multiple views in your project. Create these views through the class wizard, by deriving CMyappView and CMyapp1view from the CView or any one of the associated view classes. You need to click on Add Class button on the Classwizard for this.

Once you create the views, you need to attach them to the document so that you can manipulate the views properly. Get the help on CDocument for this. 'AddView', 'RemoveView', 'GetFirstViewPosition', 'GetNextView', 'UpdateAllViews' and 'SetActiveView' of CFrameWnd should be of interest to you. You can use these MFC functions to achieve your objective. 'AddView' gives a detailed example of manipulating multiple views.

Hope this helps !!!
0
 

Author Comment

by:sram
ID: 1318388
I am not interesyed in splitter windows it has to be in one window. The second view file is message mapped from the first and the second view file also has code in the ondraw function.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ORA-01403: no data found 43 112
centeredAverage challenge 8 185
Detect file exist or not 3 201
Excel file not created as expected 7 92
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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