Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CreateControlCustom destroy issues
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CreateControlCustom destroy issues

 Post Reply Post Reply
Author
Message
hkhan View Drop Down
Newbie
Newbie
Avatar

Joined: 09 January 2009
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote hkhan Quote  Post ReplyReply Direct Link To This Post Topic: CreateControlCustom destroy issues
    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.


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: 10 January 2009 at 10:00am

Hi,

Strange have work.... Do you have 12.x version ?
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.125 seconds.