Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Crashes/strange behaviour with SaveCommandBars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crashes/strange behaviour with SaveCommandBars

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


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Topic: Crashes/strange behaviour with SaveCommandBars
    Posted: 01 November 2017 at 3:25pm

I got some problems with Load/SaveCommandBars() after upgrading from 17.3 to 18.0.1:

I have a ribbon application that opens another window (not a MDI window) with a ribbon. When I close that window and open it again, the ribbon appears to look ok except for if I make the ribbon narrow and look at the group popups – they all display the contents of the first group in the ribbon… Clicking around, the application will crash. If I don’t call SaveCommandBars all seems ok. 

I have similar problem in another ribbon application which also opens a window with ribbon; that window will crash with a heap corruption if you close it. The crash is in void CXTPCommandBars::EnableFrameTheme(BOOL bEnable) where SAFE_DELETE(pFrameHook); is called.

I just tried to compile with v17.3 and did not have these problems...

Is this anything you guys know about and are currently fixing? 

Thanks, 

Fredrik

Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (1) Thanks(1)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2017 at 8:38pm
Hello Fredrik,

We have fix for similar problem (loading *.XCB files), try to use next changes in
Source/CommandBars/XTPDockState.cpp
and recompile library.
void CXTPControlComboBox::DoPropExchange(CXTPPropExchange* pPX)
{
    CXTPControlPopup::DoPropExchange(pPX);

    PX_Bool(pPX, _T("DropDown"), m_bDropDown, TRUE);

    // The Width property is already serialized in CXTPControl
    // so in order to avoid double DPI scaling it must not be read twice (ticket 35575),
    // however the value still must be read out to provide format backward compatibility (ticket 36079).
    int nUnusedWidth = m_nWidth;
    PX_DPI_X_Int(pPX, _T("Width"), nUnusedWidth, 0);
    UNUSED(nUnusedWidth);

    PX_Enum(pPX, _T("ComboStyle"), m_comboStyle, xtpComboNormal);

Fix will be available soon in next release.

Regards,
 Oleksandr Lebed
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2017 at 1:20am
Hello Fredrik,

Can you confirm that problem can be solved  with this changes ?
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2017 at 4:14am
Hi olebed, I just tested, but unfortunately it did not help. I will see whether I can make a sample application to reproduce.
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
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.125 seconds.