the CXTPTabControl problem |
Post Reply |
Author | |
littleameng
Groupie Joined: 22 June 2008 Location: China Status: Offline Points: 23 |
Post Options
Thanks(0)
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!
|
|
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 |