Print Page | Close Window

CreateControlCustom destroy issues

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=13138
Printed Date: 04 May 2024 at 11:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CreateControlCustom destroy issues
Posted By: hkhan
Subject: CreateControlCustom destroy issues
Date Posted: 09 January 2009 at 5:13pm
Folks,

We've just started using XT, and we're having some issues.

We create a Windows Slider control, and then dock it using the following:

void Foo::AddThumbWheel(CXTPRibbonGroup* pGroup, AppCommand* command, int width, bool startGroup)
{
     // Create the Slider control and add it to the bar.
     CSliderCtrl* wndSlider = new CSliderCtrl();
     wndSlider->Create(TBS_HORZ | TBS_NOTICKS | WS_CHILD | WS_VISIBLE, CRect(0, 0, width, 19), this, command->GetID());
     wndSlider->SetRangeMax(255);
     CXTPControlCustom* pControlSlider = CXTPControlCustom::CreateControlCustom(wndSlider);
     pControlSlider->SetBorders(0,1,0,0); // (right, top, left, bottom)
     pGroup->Add(pControlSlider, command->GetID());
}

The problem is, when pGroup is destroyed (via m_pRibbonBar->RemoveTab( tab ); ), the slider does not disappear, but stays on the ribbon bar.

Are we adding the control incorrectly?

Thanks much, folks. I've spent a day tearing my hair out over this.





Replies:
Posted By: Oleg
Date Posted: 10 January 2009 at 10:00am

Hi,

Strange have work.... Do you have 12.x version ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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