Solved

VC++ MDI with different view setup

Posted on 1998-08-27
2
223 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 432
Getting IP address 8 79
Grammars for C C++ and java 1 122
Path to  STL Map header file 1 58
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

810 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