title: CMFCCaptionBar with multiple buttons?
body: <p>I made a subclass of <code>CMFCCaptionBar</code> in what has so far been a vain attempt to make it do something more useful than just having a single icon, single text field, and single button while still maintaining the same look, feel, and other GUI functionality.</p>
  
  <p>Reference: <a href="http://msdn.microsoft.com/en-us/library/bb983960%28v=vs.90%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb983960%28v=vs.90%29.aspx</a><br>
  Example: <img src="https://i.stack.imgur.com/RbM12.png" alt="CMFCCaptionBar Class"></p>
  
  <p>Haven't really figured out anything that works yet as it seems pretty locked down.  You can remove things but can't really add things as far as I can tell.  What I'd like to be able to do is add different icons from an <code>CImageList</code> and formatted text on multiple buttons dynamically.  Then provide a context menu with additional options when each button is clicked that corresponds to data the button represents.</p>
  
  <p>If there is a way to make a horizontal <code>CTreeCtrl</code> or <code>CListCtrl</code> layout on a toolbar that functions similarly I'm game to try that out too but I tried subclassing <code>CMFCReBar</code> and putting a custom <code>CDialogBar</code> on it and that didn't play very nicely with the ribbon control and other things in use.  Actually that's putting it nicely is was basically a nightmare and waste of time.</p>
  
  <p>This is for navigating a parent child relationships of different items that will change based on the current selection in other <code>DockablePane</code> window views.  These views vary from hierarchical, lists, 3d, and statistical representations of the items.  The idea is to provide something similar to this caption bar across the top so the user can always see and interact with the currently selected object and immediate parents or children which may not always be obvious from the current view (especially in 3d).</p>
  
  <p>Something like this is what I'm aiming for (use your imagination, my mspaint skills are weak) <img src="https://i.stack.imgur.com/UFX2L.png" alt="CMFCCaptionBar Subclass"></p>
  
  <p>Any suggestions at all are welcome ... other than not using MFC because I'm stuck with it.</p>