Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Copy don't work anymore in 11.2.0!!!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Copy don't work anymore in 11.2.0!!!

 Post Reply Post Reply
Author
Message
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: Copy don't work anymore in 11.2.0!!!
    Posted: 31 October 2007 at 12:15pm
Hello Codejock-Team,
 
we build our ribbonbar dynamically and it works until 11.1.3.
 
Today we change the library to 11.2.0 and have the following problem:
 
After creating a ribbon group
CXTPRibbonGroup* pGroup = ribbonTab.AddGroup( IDS_RIBBON_GROUP_SERVER );
 
I add a copy of this group for displaying it in customize dialog box later (if called).
if (!customizeDialog.AddClone( pGroup->GetControlGroupPopup() ))
   return false;
 
This code calls
CXTPControls::AddClone
CXTPRibbonGroupControlPopup::Copy
CXTPControlButton::Copy
CXTPControl::Copy

This method copy all member attributes except m_Parent. This make sense and works like in 11.1.3.

After copying, following new code will be execute in CXTPRibbonGroupControlPopup:

ASSERT(m_pParent);
if
(GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
{
   m_pPopupGroup = GetRibbonBar()->FindGroup(GetID());
}
else
{
   m_pPopupGroup = ((CXTPRibbonGroupControlPopup*)pControl)->m_pPopupGroup;
}
 
Of course the ASSERT fails and GetRibbonBar(), too (because it also access to m_Parent).
When is m_Parent set??? It never possible, isn't it?
 
We like to release our update next week. Is it possible to get an fix or should we go back to 11.1.3?
 
Thanks
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: 31 October 2007 at 2:10pm
Hello,
 
Thanks, I see your point.
 
Please replace these lines as
 
from
 ASSERT(m_pParent);
 if (GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
to
 
 if (m_pParent && pControl->GetParent() && GetRibbonBar() != ((CXTPRibbonGroupControlPopup*)pControl)->GetRibbonBar())
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.157 seconds.