I added 200 CXTPReportView in TabbedView:
int CTabbedViewView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) return -1;
m_wndTabControl.Create(WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, IDC_TABCONTROL); m_wndTabControl.GetPaintManager()->SetAppearance(xtpTabAppearancePropertyPage2003); m_wndTabControl.GetPaintManager()->m_bHotTracking = TRUE; m_wndTabControl.GetPaintManager()->m_bShowIcons = TRUE; m_wndTabControl.GetPaintManager()->DisableLunaColors(FALSE);
m_wndTabControl.GetImageManager()->SetIcons(IDB_TAB_ICONS, NULL, 0, CSize(16, 16), xtpImageNormal);
AddView(RUNTIME_CLASS(CEditControlView), _T("Edit Control"), 3); AddView(RUNTIME_CLASS(CFileTreeView), _T("File Tree"), 0); AddView(RUNTIME_CLASS(CClassTreeView), _T("Class Tree"), 4); AddView(RUNTIME_CLASS(CResourceTreeView), _T("Resource Tree"), 2); AddView(RUNTIME_CLASS(CPropertiesView), _T("Properties"), 1);
CString strTabTitle; for (int i = 0; i < 200; ++i) { strTabTitle.Format("Report View %d", i + 1); AddView(RUNTIME_CLASS(CXTPReportView), strTabTitle, 0); }
return 0; }
Compile and run it.
Maximize the window and the view;
Click the tab from "Report View 1" to "Report View 200".
Like this:
(My computer: Intel Core 2 Quad CPU Q6600 @2.4GHz; 2.00GB Memory; 1440*960 LCD.)
when clicked about "Report View 114", the window painted ugly.(I'm sorry to say that i can't capture the window!)
and on a computer of Intel Pentium IV 3.0GHz; 1.00GB Memory; 1280*1024 LCD, it appears at "Report View 22" or more.
but if i replace CXTPReportView with CEditView, it works well.
why?
|