I'm trying to a add a new menu drop down to the ArcCatalog menu bar. I tried to use the built in ArcGIS base menu template in Visual Studios 2010 but no luck. I also tried to manually add the dll create with the base menu template in the custom dialog box but my menu does or menu items do not appear in the list.
I think my best approach is to use the IExtension but all the example I see online is using ArcMap. The examples retrieve the main menu by getting it from a new or open document using the "IApplication...CommandBar.Find" but I don't think there's a "document" in ArcCatalog?
I tried the following with no luck. I assume the document return from the IApplication is a GxDocument. I might be wrong.
public void Startup(ref object initializationData)
{
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
ICommandBar topMenu = null;
UID topMenuUid = new UIDClass();
object index = null;
ICommandBars commandBars = null;
IDocument document = null;
if (initializationData is IGxApplication)
{
m_application = (IApplication)initializationData;
topMenuUid.Value = ARCCATALOG_MAIN_MENU_UID;
document = m_application.Document;
ICommandBars commandBars = document.CommandBars;
}
}