I have a CAB application that uses multiple toolbars. Sometimes I want to add a button to the current toolbar. The button already exists so I do not need to programmatically create it but I do need to explicitly add it to whatever toolbar the current CAB view is about to display. How can this be done?
Nevermind. I figured it out. It looks like the toolbar itself, given either a numerical index or a string key, knows how to get the button from the owning toolbar manager's collection of Tools so all that is needed is to pass a key to the toolbar and tell it to add the associated button.
Theoretical example:
UltraToolbar tb = m_ToolbarMgr.Toolbars[strTbKey];
tb.Tools.AddTool(strButtonKey);