Nested CXTPTaskPanelGroup |
Post Reply |
Author | |
fbeaupre
Newbie Joined: 22 May 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 22 May 2006 at 10:26am |
Hi, I would like to have the possibility to put a CXTPTaskPanelGroup inside of a CXTPTaskPanelGroupItems class. Since CXTPTaskPanelGroup is a child of CXTPTaskPanelItem, this should be pretty straightforward. In doing so, I could have multiple levels of nested groups inside my task panels (kink of like in a treeview). Here is the code I used to nest my groups (modified version of toolbox sample) (I force the call to ResetToolboxItems at every program startup): void CMainFrame::ResetToolboxItems() CXTPTaskPanelGroup* pFolderData = CreateToolboxGroup(ID_TOOLBOXFOLDER_DATA); { pFolderData->SetExpanded(TRUE); With the above code, everything compiles (all I do is legal according to the class hierarchy and the documentation). The problem occurs at runtime. I get a crash in this function:
for (int i = pGroup->GetOffsetItem(); i < pGroup->GetItemCount(); i++) CRect rcItem = pItem->GetItemRect(); pItem->OnDrawItem(pDC, rcItem); The problem comes from the GetAt function which does a c static cast on the returned pointer assuming that the base class pointer is of a certain derived type (which is a bug or a lack of documentation, in my opinion) Here is the code of GetAt: CXTPTaskPanelGroupItem* CXTPTaskPanelGroup::GetAt(int nIndex) const I would really appreciate if someone at codejock could tell me if you are going to support nested CXTPTaskPanelGroup in a short period of time. We would need such a feature as soon as it would be available. |
|
Frédérick Beaupré
Software Developper InnovMetric Software Inc. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, It can't work.... You can only create another TaskPanel and insert it as control.
use Search... I posted some sample time ago..
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Is it possible to put a CListCtrl inside a panel / group? I guess not - the ShortcutBar is what I want anyway! |
|
Simon HB9DRV
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You can :)
in TakPanel sample see Search dialog.
CXTPTaskPanelGroupItem* pItem = pGroup->AddControlItem(m_dlgModified);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |