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

XTexcelflatcontrol issue

 Post Reply Post Reply
Author
Message
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Topic: XTexcelflatcontrol issue
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2006 at 3:18am
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
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2006 at 8:44pm
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 12:17am
May be FlexGrid automatically show self in Create. Hide it before InsertImte:
 
m_objFlexGrid.ModifyStyle(WS_VISIBLE, 0);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 1:23am
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 5:47am
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 5:49am
ps: for next release we will change it also to avoid same ASSERT...
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 12:46pm
That Also I tried.. Still I am in the same track..
Babs
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2006 at 4:03am
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
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2006 at 1:46pm
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
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.109 seconds.