Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - the CXTPTabControl problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

the CXTPTabControl problem

 Post Reply Post Reply
Author
Message
littleameng View Drop Down
Groupie
Groupie
Avatar

Joined: 22 June 2008
Location: China
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote littleameng Quote  Post ReplyReply Direct Link To This Post Topic: the CXTPTabControl problem
    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!
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.156 seconds.