![]()  | 
 
Problem with dynamic toolbar | 
 
    Post Reply  
   | 
  
| Author | |
   
   Denbuerg  
   
   Newbie  
   Joined: 14 March 2006 Location: Germany Status: Offline Points: 12  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Problem with dynamic toolbarPosted: 01 June 2006 at 10:59am  | 
 
| 
   
    
   Hi, 
   
  I add new items to my standard toolbar like this: CXTPControls* pControls = m_pToolBar->GetControls(); CXTPControl* pControl = new CXTPControlButton(); pControls->Add(pControl, nCommandID, NULL, nPos, TRUE); ... But when I close my application, an exception occurs here: DWORD CCmdTarget::InternalRelease() { ASSERT(GetInterfaceMap() != NULL); ... This function is called by CXTPControls::RemoveAll(void) on MainFrame destruction. If I dont add a new Button to the toolbar, it works. What am I doing wrong?  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 01 June 2006 at 12:31pm | 
 
| 
   
    Hello, Code looks ok, Problem somewhere else... Can yo uatttach project here?  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   Denbuerg  
   
   Newbie  
   Joined: 14 March 2006 Location: Germany Status: Offline Points: 12  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 02 June 2006 at 3:01am | 
 
| 
   
    
   I found the problem. 
   
  Instead of adding the same control button I added to the menu, I created a new control button. Now it works.  | 
 |
![]()  | 
 |
    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  |