AnsweredAssumed Answered

Insert menu Add in c#

Question asked by Clan Berg on Jul 16, 2015

how do I create a menu at the bar ?

menuSol.JPG

I want to insert a menu after the "Ajuda". how can I do this?

 

I have the code:

 

private bool AddMenus()
{
    int docType = -1;
    int pos = 6;

    if (swApp.ActiveDoc != null)
    {
        IModelDoc2 modDoc = (IModelDoc2)swApp.ActiveDoc;
        IModelView view = (IModelView)modDoc.GetFirstModelView();

        if (view.FrameState != (int)swWindowState_e.swWindowMaximized)
            pos = 5;
     }

    docType = (int)swDocumentTypes_e.swDocDRAWING;
    swApp.AddMenu(docType, "MyMenu", pos);
    return true;
}

Outcomes