![]() |
Removing CXTPToolBar |
Post Reply
|
| Author | |
BobWansink
Groupie
Joined: 24 January 2008 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
Topic: Removing CXTPToolBarPosted: 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++ |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
BobWansink
Groupie
Joined: 24 January 2008 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
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++ |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |