![]()  | 
 
Add or Remove buttons disabled? | 
 
    Post Reply  
   | 
  
| Author | |
   
   bharper  
   
   Newbie  
   Joined: 28 March 2015 Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Add or Remove buttons disabled?Posted: 28 March 2015 at 6:14am  | 
 
| 
   
    
   
Hello,
 
   
  I have just purchased the commandbars control and am having problems with the customising. The menu items on the Add and Remove sections are disabled. Can you please advise how I enable these buttons? 
Screen shot below. 
kind regards, 
Brian Harper 
![]()  | 
 |
![]()  | 
 |
   
   mcmastl  
   
   Senior Member  
   Joined: 14 April 2015 Status: Offline Points: 79  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 April 2015 at 2:17pm | 
 
| 
   
    
   Hi Brian Harper, 
   
  Make sure you have included the CommandBars message handlers in your .CPP file, for example: ON_COMMAND(XTP_ID_CUSTOMIZE, OnCustomize) and void CMainFrame::OnCustomize() { 	// Get a pointer to the command bars object. 	CXTPCommandBars* pCommandBars = GetCommandBars(); 	if (pCommandBars == NULL) 		return; 	// Instantiate the customize dialog. 	CXTPCustomizeSheet dlg(pCommandBars); 	// Add the options page to the customize dialog. 	CXTPCustomizeOptionsPage pageOptions(&dlg); 	dlg.AddPage(&pageOptions); 	// Add the commands page to the customize dialog. 	CXTPCustomizeCommandsPage* pPageCommands = dlg.GetCommandsPage(); 	pPageCommands->AddCategories(IDR_MAINFRAME, TRUE); 	// Initialize the commands page page. 	pPageCommands->InsertAllCommandsCategory(); 	pPageCommands->InsertBuiltInMenus(IDR_MAINFRAME); 	pPageCommands->InsertNewMenuCategory(); 	// Display the customize dialog. 	dlg.DoModal(); } if you are still having trouble please let us know. 
    | 
 |
| 
   
     
     Luke McMasters, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   bharper  
   
   Newbie  
   Joined: 28 March 2015 Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 22 April 2015 at 4:18am | 
 
| 
   
    
   Yes that code is there otherwise the customize options wouldn't even display. I have a sample project i can send if you want to see the problem? 
   
  Kind regards, Brian 
    | 
 |
![]()  | 
 |
    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  |