I want to develop a MDI-application with one view (CFormView) on startup.
After user input I would like to open another view derived from CView
presenting the user with the results from his query. In this view the the
user can open each individual item. This should result in another view
derived from CFormView (but ofcourse not the same as the first view visible
on startup) displaying detailed information about the selected item.
I'm pretty new to this doc/view and the whole frame thing. Could someone
tell me how I can get multiple views (all different classes and derived from
2 types of base classes (CView/CFormView))?
cheers,
Paul
void CMyFormView::OnNewView()
{
AfxGetApp()->m_pView1DocTemplate->AddDocument(GetDocument());
CFrameWnd* FrameWnd =
AfxGetApp()->m_pView1DocTemplate->CreateNewFrame(pDoc,NULL);
if (FrameWnd)
{
pDoc->SetTitle(Title);
FrameWnd->SetTitle(Title);
FrameWnd->InitialUpdateFrame(pDoc,TRUE);
FrameWnd->SetFocus();
}
}
or you can do if from the document class, where ever it might make sense to
you.
AliR.
"Paul Schouten" <vincent_...@yahoo.com> wrote in message
news:42d6493f$0$34146$e4fe...@news.xs4all.nl...
"AliR" <Al...@online.nospam> schreef in bericht
news:42d68797$1...@alt.athenanews.com...
You can create any number of views (I think limit is 127) in the same frame
wired to the same document object; hence they all will share the same data.
See this thread: http://www.codeguru.com/forum/showthread.php?t=296513 where
you will fins couple of samples I have posted dealing with different
requirements for using multiple views.
--
RainMan
cheers,
Paul
"RainMan" <Rai...@online.nospam> schreef in bericht
news:98C7BEB5-315C-4118...@microsoft.com...