![]()  | 
 
Custom label | 
 
    Post Reply  
   | 
  
| Author | |
   
   Woody  
   
   Newbie  
   Joined: 07 July 2004 Status: Offline Points: 20  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Custom labelPosted: 04 August 2004 at 7:57am  | 
 
| 
   
    
   I can't find anything on using the xtpControlCustom feature. 
   
  How can I add a custom label to a toolbar on an MDI form? Thanks  | 
 |
![]()  | 
 |
   
   SuperMario  
   
   Senior Member  
    
   Joined: 14 February 2004 Status: Offline Points: 18057  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 August 2004 at 8:03am | 
 
| 
   
    
   To add a form that contains some controls, you can do something like this: 
   
  Set ControlEdit = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&Edit", -1, False) ControlEdit.Id = ID_EDIT With ControlEdit.CommandBar.Controls Dim ControlSearch As CommandBarControlCustom Dim crtlSearchForm As New frmSearch Set Control = .Add(xtpControlPopup, 0, "&Search", -1, False) Control.Id = ID_EDIT_FIND Set ControlSearch = Control.CommandBar.Controls.Add(xtpControlCustom, ID_SEARCH_FORM, "Search Form", -1, False) ControlSearch.Handle = crtlSearchForm.hwnd Set Control = .Add(xtpControlButton, ID_EDIT_CUT, "Cu&t", -1, False) Control.BeginGroup = True .Add xtpControlButton, ID_EDIT_COPY, "&Copy", -1, False .Add xtpControlButton, ID_EDIT_PASTE, "&Paste", -1, False End With Basically, you can add anything that has a hwnd. If the control does not have a hwnd, then you will have to place it on a form or inside another control that does have a hwnd.  | 
 |
![]()  | 
 |
   
   Woody  
   
   Newbie  
   Joined: 07 July 2004 Status: Offline Points: 20  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 06 August 2004 at 3:56pm | 
 
| 
   
    
   Thanks, it works fine now!
    
   
   | 
 |
![]()  | 
 |
    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  |