AnsweredAssumed Answered


Question asked by Pablo Fernández on Apr 28, 2017
Latest reply on Apr 28, 2017 by Pablo Fernández

Does the method IEdmCmdMgr5.AddToolbarImage actually work?

I've been trying to add an image to a menu command with no success after many attempts.

Heres a  C# piece of code that I think should work.

The resource "dim" is a bitmap 16x16x8bit


            Bitmap dim = AddinRevisionPDF.Properties.Resources.dim;
            poCmdMgr.AddToolbarImage(dim.GetHbitmap().ToInt32(), 1, EdmButtonState.BState_Cold, false,true, 12632256, 99);
            poCmdMgr.AddCmd(1, "Control Dimensional", (int)(EdmMenuFlags.EdmMenu_MustHaveSelection | EdmMenuFlags.EdmMenu_OnlyFiles | EdmMenuFlags.EdmMenu_OnlySingleSelection | EdmMenuFlags.EdmMenu_HasToolbarButton | EdmMenuFlags.EdmMenu_HastItemToolbarButton), "Asigna el archivo a un usuario para controlar cotas", "", 0, 99);