Solved

Create View from another View

Posted on 1997-10-17
2
442 Views
Last Modified: 2013-11-20
I'm in that situation. I've created a View, I've two button controls. If I say 'ok' I want to create another View, if I say 'cancel' I want to create another View, not always the previous one. I've thinked to get the mainframe pointer and switch from views using it, but I've not found the command to get it. The best is to create view directly from the other view. Can I have the simplest way to do that ?
0
Comment
Question by:css
2 Comments
 
LVL 3

Expert Comment

by:shaig
Comment Utility
If it is nessasery to keep the original view alive after pressing buttons then:
create all needed view's befor and switch between them trough
CFrameWnd::SetActiveView    //your mainframe class is derived from CFrameWnd

If it isn't nessasery to keep the original view exsisting, then simply destroy it and create a new one.
0
 
LVL 1

Accepted Solution

by:
IgorGrebnev earned 10 total points
Comment Utility
You can get pointer to mainframe with
"GetParentFrame" funciton
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.

762 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

9 Experts available now in Live!

Get 1:1 Help Now