Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Create View from another View

Posted on 1997-10-17
2
Medium Priority
?
469 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
ID: 1308264
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 30 total points
ID: 1308265
You can get pointer to mainframe with
"GetParentFrame" funciton
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

916 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