Print Page | Close Window

Crashes/strange behaviour with SaveCommandBars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23476
Printed Date: 21 November 2024 at 4:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Crashes/strange behaviour with SaveCommandBars
Posted By: Fredrik
Subject: Crashes/strange behaviour with SaveCommandBars
Date 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



Replies:
Posted By: olebed
Date 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


Posted By: olebed
Date Posted: 07 November 2017 at 1:20am
Hello Fredrik,

Can you confirm that problem can be solved  with this changes ?


Posted By: Fredrik
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net