Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Removing CXTPToolBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Removing CXTPToolBar

 Post Reply Post Reply
Author
Message
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post Topic: Removing CXTPToolBar
    Posted: 25 February 2009 at 8:02am
Hi,

I've hit a snag in the following situation:

we have a frame with a CXTPCommandBars in it. It contains a toolbar with some buttons. When i press one of them, I would like to remove the toolbar. I've tried to CXTPCommandBars::Remove() it, but that results in a crash.

Simply put, we want to be able to remove a toolbar when a user click on one of that toolbar's buttons. Is that possible?

Thanks in advance.

Bob
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++
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: 25 February 2009 at 8:29am

Hi,

Can't  reproduce it. In our customThemes sample add
 
void CMainFrame::OnViewOffice2007Frame()
{
 GetCommandBars()->Remove(GetCommandBars()->GetToolBar(IDR_SWITCH));
}
 
and click "Office2007 Frame" button.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 4:17am
Hi oleg,

further testing on our part revealed that we'd delete'd the controls on the bar. The subsequent Remove() then tries to delete the controls that don't exist anymore.

 
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++
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.047 seconds.