Solved

VC++ MDI with different view setup

Posted on 1998-08-27
2
220 Views
Last Modified: 2008-03-06
What do I need to do for the MDI application with different formviews to be open depending on the different button click instead of opening the same view everytime clicking on "New button"?
0
Comment
Question by:aung
2 Comments
 

Author Comment

by:aung
ID: 1171362
Edited text of question
0
 
LVL 2

Accepted Solution

by:
milenvk earned 100 total points
ID: 1171363
Create different document templates - a different template for each view in your InitInstance() handler. Then create a button on the toolbar and a command on the menu for each different view. Then handle the commands in your application or mainframe class and open a new specific window for the view like in the following example:

void CMyApp::OnFileNewView1()
{
    m_pTemplView1->OpenDocumentFile(NULL);  // Means create new file
}

for the View2 it could be

void CMyApp::OnFileNewView2()
{
    m_pTemplView2->OpenDocumentFile(NULL);  // Means create new file
}
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

747 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

11 Experts available now in Live!

Get 1:1 Help Now