XTexcelflatcontrol issue |
Post Reply |
Author | |
babumohan
Newbie Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 18 November 2006 at 11:35am |
I am using a CXTFlatTabCtrl to create a flat tab control
I have a class called class CUserDockWnd :CUEXTPDockWindow { CXTFlatTabCtrl m_objUserFlatCtrl; CUserFlexGrid m_objFlexGrid; } I have another class which is inherited from CVsflexgridl1 (VS FlexGrid 8.0) class CUserFlexGrid : public CVsflexgridl1 { } CUserDockWnd ::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CUEXTPDockWindow::OnCreate(lpCreateStruct) == INVALID_VALUE) { UESRCLINKTRACE(_T("CUserDockWnd ::OnCreate() Failed\n")); return -1; } m_objUserFlatCtrl.Create(WS_CHILD | WS_VISIBLE | FTS_XT_HSCROLL | FTS_XT_HASARROWS | FTS_XT_BOTTOM,CRect(0,0,0,0), this, IDC_FLATTAB)) m_objFlexGrid.Create(NULL,WS_CHILD, Rect, &m_objUserFlatCtrl, IDC_UE_GRID_MSGAREA, NULL, NULL, NULL) SetChild(&m_objUserFlatCtrlb); } On Debug mode I am getting Assertion window like below Assertion Is coming on the following funtion int CXTExcelTabCtrl::InsertItem(int nItem, LPCTSTR lpszItem, CWnd* pWndControl) { const int cItems = GetItemCount(); if (nItem < 0 || nItem > cItems) return -1; if (pWndControl) { ASSERT(::IsWindow(pWndControl->m_hWnd)); // managed view should be a hidden child ASSERT((pWndControl->GetStyle() & (WS_VISIBLE | WS_CHILD)) == WS_CHILD); .... } |
|
Babs
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
You don't show code where you call InsertItem.... anyway before call InsertItem check that m_objFlexGrid don't have WS_VISIBLE style.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
babumohan
Newbie Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
IsertItem Code :
CUserDockWnd ::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CUEXTPDockWindow::OnCreate(lpCreateStruct) == INVALID_VALUE) { UESRCLINKTRACE(_T("CUserDockWnd ::OnCreate() Failed\n")); return -1; } m_objUserFlatCtrl.Create(WS_CHILD | WS_VISIBLE | FTS_XT_HSCROLL | FTS_XT_HASARROWS | FTS_XT_BOTTOM,CRect(0,0,0,0), this, IDC_FLATTAB)) m_objFlexGrid.Create(NULL,WS_CHILD, Rect, &m_objUserFlatCtrl, IDC_UE_GRID_MSGAREA, NULL, NULL, NULL) SetChild(&m_objUserFlatCtrlb); if (! m_objUserFlatCtrl.InsertItem(ZERO, "FlexGrid", &m_objFlexGrid)) { ASSERT(0); } } |
|
Babs
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
May be FlexGrid automatically show self in Create. Hide it before InsertImte:
m_objFlexGrid.ModifyStyle(WS_VISIBLE, 0);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
babumohan
Newbie Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Still I am getting the same assertion Dialog box..
Below is the CVsflexgridl1 class declaration... class CVsflexgridl1: public CWnd { protected: DECLARE_DYNCREATE(CVsflexgridl1) public: CLSID const& GetClsid() { static CLSID const clsid = { 0xF026C11, 0x5A66, 0x4C2B, { 0x87, 0xB5, 0x88, 0xDD, 0xEB, 0xAE, 0x72, 0xA1 } }; return clsid; } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } } |
|
Babs
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Right, just tried in our sample and see same problem.
Reason that for Control windows GetStyle retirves control style not window style and control style have not WS_CHILD style.
As solution I can only suggest comment this ASSERT message in sources and rebuild library in IDE/Wizard.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ps: for next release we will change it also to avoid same ASSERT...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
babumohan
Newbie Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
That Also I tried.. Still I am in the same track..
|
|
Babs
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
You tried comment ASSERT and still see it ? It can be only if you don't rebuild toolkit dll or use old version (may be you copied it to some place and use)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
babumohan
Newbie Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Now It is ok..
No Need to Remove the Assert Statement from the xtreme toolkit. I override the insertitem method ans commented the assert statement. Now it is working fine.. Thank you |
|
Babs
|
|
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 |