Error when added many CXTPReportView in TabbedView |
Post Reply |
Author | |
shineryu
Groupie Joined: 02 April 2006 Location: China Status: Offline Points: 33 |
Post Options
Thanks(0)
Posted: 18 July 2008 at 12:50am |
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?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |