Print Page | Close Window

Error when added many CXTPReportView in TabbedView

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11482
Printed Date: 27 September 2024 at 4:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Error when added many CXTPReportView in TabbedView
Posted By: shineryu
Subject: Error when added many CXTPReportView in TabbedView
Date 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?
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net