Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create View from another View

Posted on 1997-10-17
2
Medium Priority
?
465 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
[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
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: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

719 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