Solved

Create View from another View

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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 78
Separate into files by filename 12 82
Define unique primary key 9 92
wait notify demo infinite loop 3 110
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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