Sign in to follow this  
lucky6969b

MFC Multiple Views / Same Doc Question

Recommended Posts


CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(IDR_SimTYPE,
RUNTIME_CLASS(CSimDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CSimView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);

pDocTemplate = new CMultiDocTemplate(IDR_SimTYPE,
RUNTIME_CLASS(CSimDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMyDataView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);






Compiler: VS2008 SP1
OS: Win7 Ultimate 64-bit

Hi,
From the code snippet above, the application starts by asking me which view do I want to use before the "actual" window comes up, I wonder how do I make an application so that it starts in its own window with two seperate but unique views inside it. How do I write the above application?
I have created a secondary class called CMyDataView which inherits from CView.
I'd like to write a concurrent application that runs 2 views simultaneously.
Thanks
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this