|
VS (Visual Studio) Template Context Menu This article is regarding the addition of context menu in Visual Studio IDE. We want to add a menu item in the context menu after right clicking on VS Template, the approach is to open an another window after clicking the context menu item which would allow us to add some files in solution explorer.
Add an item to Windows Explorer Shell context menu easily – How it may be done ? Insert items to Windows Explorer context menu easily with Explorer Context Menu. This powerful .Net component for custom items adding to Windows Explorer Shell context menu will insert all your application items to the Explorer Shell context menu. This .Net component and VB.NET support include detailed C# and VB.NET samples, tutorials , user-friendly manuals and support all you may need to add your entries to Explorer context menu : - Add items to Windows Explorer context menu to be shown on any Windows operating system (all operating systems are supported – XP, Vista, x64 , etc.)
- Add items to Windows Explorer context menu to be shown in any way - with your custom caption and icon, as separator or sub-menu
- Add items of any types to Windows Explorer context menu to be shown for all files or shown only for files of particular type (for example, only for .DOC , .MP3,.WMA,.AAC , .AVI files)
- Add items to Explorer Shell context menu, sub-menus, sub-sub-menus, sub-menus of unlimited depth and add to Explorer context menu entries of all types
Explorer Shell Context Menu - is a powerful .Net framework component that support all you may need to add all your program items to Windows Explorer Shell context menu - in a fast and easy way. Add all your program entries to Windows Explorer context menu right now – fast and exactly as you prefere :
Here is described how to add custom items (add custom entries) to Visual Studio (C#, VB.NET) context menu and how to add custom items to Windows Explorer Shell context menu, but this context menu customizing method works only for Windows 95 / Windows 98 (not on XP, Vista, x64 - 64-bit Windows), to add items to Windows Explorer Shell context menu you should use, according to Microsoft guidelines, appropriate .Net component - Windows Explorer Context Menu. We have tried it through VSIP(Visual Studio Integration Package) but were not able to add the context menu item. As we found, we can add item in Context Menu for Code window, Tool Box Item, Solution Explorer, Toolbar etc. which where very generic. But here we are looking for specific context menu item and that’s with VS Template only.
After study for VSIP we found that for each context menu there is Context Menu Identifiers and these Identifiers are used with GUID Identifiers. Both the Context Menu identifiers and GUID identifiers use hexadecimal numbers and all are different from each other. So if we want to define our own context menu for a particular scenario(Let say right click on VS Template) then
- How we should pick this hexadecimal number for GUID and Context Menu Identifier.
- Where to write the event binding code for the user defined context menu.
Following are few examples of GUID and Context Menu identifiers available in Visual studio Shell which we have taken from vsshlids.h files found in <Drive:>\ \Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Common\Inc folder.
// Guid for Shell's group and menu ids
DEFINE_GUID (guidSHLMainMenu,
0xd309f791, 0x903f, 0x11d0, 0x9e, 0xfc, 0x00, 0xa0, 0xc9, 0x11, 0x00, 0x4f);
// Guid for Shell's group and menu ids
#define guidSHLMainMenu { 0xd309f791, 0x903f, 0x11d0, { 0x9e, 0xfc, 0x00, 0xa0, 0xc9, 0x11, 0x00, 0x4f } }
//////////////////////////////////////////////////////////////////////////////
//
// Context Menu Identifiers, created by Visual Studio Shell
//
//////////////////////////////////////////////////////////////////////////////
#define IDM_VS_CTXT_PROJNODE 0x0402
#define IDM_VS_CTXT_PROJWIN 0x0403
#define IDM_VS_CTXT_PROJWINBREAK 0x0404
#define IDM_VS_CTXT_ERRORLIST 0x0405
#define IDM_VS_CTXT_DOCKEDWINDOW 0x0406
#define IDM_VS_CTXT_MENUDES 0x0407
#define IDM_VS_CTXT_PROPBRS 0x0408
#define IDM_VS_CTXT_TOOLBOX 0x0409
// UNUSED: 0x040A - 0x040C
#define IDM_VS_CTXT_CODEWIN 0x040D
#define IDM_VS_CTXT_TASKLIST 0x040E
#define IDM_VS_CTXT_RESULTSLIST 0x0411
#define IDM_VS_CTXT_STUBPROJECT 0x0412
#define IDM_VS_CTXT_SOLNNODE 0x0413
#define IDM_VS_CTXT_SOLNFOLDER 0x0414 |