|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Debabrata Mukherjee
|
Oct 26, 2007 - 8:24 AM
|
As we have discussed so many times, I have a CExtTabPagecontainerWnd. This window can add pages at runtime. I have new views created for thiese new pages at runtime using the following code and I store these newly created views in a CObList.
m_pChildActiveView = new CSaIsPresentationView();//Sanky 27thsep if(!m_pChildActiveView->Create(NULL,_T(""),WS_VISIBLE | WS_CHILD,CRect(200,200,1,1),m_pChildView,ID_VIEW_BASE)) { AfxMessageBox("Failed to create new sink view"); }
CWnd* wndMain = AfxGetMainWnd(); CSaIsMainFrame* mainFrame = reinterpret_cast<CSaIsMainFrame*>(wndMain); m_pChildActiveView->SetDocument((CSaIsDoc*)mainFrame->GetActiveDocument());
m_listViews.AddTail(m_pChildActiveView); // Tail added to the list.
Then I create the objects that I want to show on these views by passing these views one by one like this:
((*iterSinks).second)->m_pChildActiveView = (CSaIsPresentationView*)m_listViews.GetTail(); //get the latest CView* before u create the client sink
pSink->CreateClientSink(FALSE); //this line physically creates the client sink(the object to be placed on the view).
//Insert the page here with the view that I get from the list above. m_pChildView->PageInsert (((*iterSinks).second)->m_pChildActiveView->GetSafeHwnd(),pSink->GetSinkFullPathName());
So finally the page is inserted. But what seems very very strange is when I select some of the tabs they show the things that need to be shown while others dont
(for e.g. tab1,tab2 shows the views, then tab3 is added and every thing gets hidden. i.e. none of th tabs show any thing rather empty views are shown.)
If I open this document wth three tabs after saving them, all three tabs appear with proper views in it. This problem has harangued me for many many days and I see no respite.
Is it an issue with repainting( which is what I guess) or some flag or value of the CExtTabPageContainerWnd needs to be set properly... Please help me with this This is really urgent now!
|
|