Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Error when added many CXTPReportView in TabbedView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error when added many CXTPReportView in TabbedView

 Post Reply Post Reply
Author
Message
shineryu View Drop Down
Groupie
Groupie


Joined: 02 April 2006
Location: China
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote shineryu Quote  Post ReplyReply Direct Link To This Post Topic: Error when added many CXTPReportView in TabbedView
    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?
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.