none
Add a menu item to context menu

    Question

  • Hi,

    within my vs package i would like to realize the following:
    how is it possible to add a menu item to the context menu which appears when i right-click on a C# project in the solution explorer.
    Any ideas?

    thanks,
    bkohler
    Friday, January 19, 2007 12:10 PM

Answers

  • You can try to define something like this so that your command is under the IDG_VS_CTXT_PROJECT_START for unmanaged code and VS_CTXT_PROJECT_NODE for managed code.

    BUTTONS_BEGIN

    guidMyPkg:cmdidAddNewFile, guidSHLMainMenu:IDG_VS_CTXT_PROJECT_START, 0x0100, guidSHLMainMenu:1, BUTTON, , "Add Ne&w Library"; // rest are not used

    guidMyPkg:cmdidAddExistingFile, guidSHLMainMenu:IDG_VS_CTXT_PROJECT_START, 0x0100, guidSHLMainMenu:16, BUTTON, , "Add Existin&g Library"; // rest are not used

    BUTTONS_END

     

    Friday, January 26, 2007 4:24 AM

All replies

  • You can try to define something like this so that your command is under the IDG_VS_CTXT_PROJECT_START for unmanaged code and VS_CTXT_PROJECT_NODE for managed code.

    BUTTONS_BEGIN

    guidMyPkg:cmdidAddNewFile, guidSHLMainMenu:IDG_VS_CTXT_PROJECT_START, 0x0100, guidSHLMainMenu:1, BUTTON, , "Add Ne&w Library"; // rest are not used

    guidMyPkg:cmdidAddExistingFile, guidSHLMainMenu:IDG_VS_CTXT_PROJECT_START, 0x0100, guidSHLMainMenu:16, BUTTON, , "Add Existin&g Library"; // rest are not used

    BUTTONS_END

     

    Friday, January 26, 2007 4:24 AM
  • thanks geogy,

    but how is it possible that the context menu item only is visible when i right-click a c# project.
    how can i define such restrictions?
    any ideas?


    thanks,
    bkohler
    Wednesday, January 31, 2007 3:49 PM