Solved

Two View files

Posted on 1998-06-24
3
180 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
3 Comments
 
LVL 7

Expert Comment

by:galkin
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now