Print Page | Close Window

the CXTPTabControl problem

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=12793
Printed Date: 16 September 2024 at 4:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: the CXTPTabControl problem
Posted By: littleameng
Subject: the CXTPTabControl problem
Date Posted: 25 November 2008 at 9:00am
my codes:
////////////////////////////////////////////////////////
BOOL CSearchFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
...
...
 if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CSearchOptionsView), CSize(270, 100), pContext) ||
  !m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CSearchContentView), CSize(0, 0), pContext))
 {
  m_wndSplitter1.DestroyWindow();
  m_wndSplitter2.DestroyWindow();
  return FALSE;
 }
 ...
...
}
///////////////////////////////////////////////////////////////////////////
//
class CSearchContentView : public CView
{
...
...
 public:
CXTPTabControl m_wndTabControl;
...
...
}
//////////////////////////////////////////////////////////////////////////
int CSearchContentView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
 if (CView::OnCreate(lpCreateStruct) == -1)
  return -1;
 
 // TODO: Add your specialized creation code here
 m_wndTabControl.Create(WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, IDC_SEARCHCONTENT_TAB);
 
 m_wndTabControl.GetImageManager()->SetIcons(IDR_TOOLBAR_HOMEIEMENUBAR, NULL, 0, CSize(16, 16), xtpImageNormal);

 
 int lUnit=::GetSystemMetrics(SM_CYMENU);
 CSize szNormal(6*lUnit, lUnit), szMin(3*lUnit, lUnit), szMax(8*lUnit, lUnit);
 m_wndTabControl.SetItemMetrics(szNormal, szMin, szMax);
 //Called to recalculate tab area and reposition components
 m_wndTabControl.Reposition();

 return 0;
}
//////////////////////////////////////////////////////////////////////////////////
when it is going to :
 
 m_wndTabControl.Create(WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, IDC_SEARCHCONTENT_TAB);
the error happen, then display the follow window :
 
 
I don't find the reason!
Please help me ! thanks!



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