Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / November 2004

Tip: Looking for answers? Try searching our database.

Code windows context menu

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mendonca - 03 Nov 2004 14:02 GMT
I am trying to add a new button in the contextMenu in the texteditor when
you rightclick during debug mode, and i am having dificulty in finding the
proper item to be the parent. This is what i have tried so far:

guidObjectMyCmdSet:MyMenuGroup, guidSHLMainMenu:IDG_VS_CODEWIN_TEXTEDIT,
0x0600;

thanks in advance..
"Ed Dore [MSFT]" - 05 Nov 2004 00:14 GMT
I created a custom marker service that added a popup menu just under the
Copy/Edit/Paste portion of the code window's context menu, with the
following .CTC. To only have them visible when the debugger is active, you
could probably just add the commands or menu to the .CTC's
VISIBILITY_SECTION so that it was only visible in the context of a debug
session.

CMDS_SECTION guidRGSServicesPkg

   MENUS_BEGIN
     // NewMenu                              Relative to Group            
         Priority    Type        Name                    Text
     guidRGSServicesPkg:RGSInsertMenu, guidRGSServicesPkg:RGSMarkerGroup,
0x400,  , "Insert &RGS Marker";

   MENUS_END

   NEWGROUPS_BEGIN
     // NewGroup                             Parent Group                  
         Priority
     guidRGSServicesPkg:RGSInsertCmds, guidRGSServicesPkg:RGSInsertMenu,
0x0000;
     guidRGSServicesPkg:RGSMarkerGroup, guidRGSServicesPkg:RGSMarkersCtx
,0x0200;
   NEWGROUPS_END

  BUTTONS_BEGIN
   // Command                    Parent Group                Priority    
Image            Type    Visibility        
  guidRGSServicesCmdSet:cmdidInsertGlyphMarker,
guidRGSServicesPkg:RGSInsertCmds, 0x100, OI_NOID, BUTTON, , "&Glyph Marker";
  guidRGSServicesCmdSet:cmdidInsertSelMarginMarker,
guidRGSServicesPkg:RGSInsertCmds, 0x101, OI_NOID, BUTTON, , "&Selection
Margin Marker";
  guidRGSServicesCmdSet:cmdidInsertLineMarker,
guidRGSServicesPkg:RGSInsertCmds, 0x102, OI_NOID, BUTTON, , "&Line Marker";
  guidRGSServicesCmdSet:cmdidInsertBorderMarker,
guidRGSServicesPkg:RGSInsertCmds, 0x103, OI_NOID, BUTTON, , "&Border
Marker";
  guidRGSServicesCmdSet:cmdidInsertDraggableMarker,
guidRGSServicesPkg:RGSInsertCmds, 0x104, OI_NOID, BUTTON, , "&Draggable
Marker";

       // Those commands are not defined as shared command, so they use
our package CLSID
       // as the command set GUID. Also, by specifying blank for the
FLAGS, this command is
       // default visible and enabled. Other valid values for FLAGS are
the following:
       //    DEFAULTDISABLED, DEFAULTINVISIBLE, DYNAMICVISIBILITY,
TEXTCHANGES
       // These values for FLAGS can be or'ed together, e.g.
"DEFAULTINVISIBLE | DYNAMICVISIBILITY"
       // If you do not want an image next to your command, set the image
to "guidOfficeIcon:msotcidNoIcon"

  BUTTONS_END

  BITMAPS_BEGIN
   // Bitmap                          Bitmap Index, Bitmap Index, ...
     guidRGSServicesCmdSet:IDB_MENU_IMAGES,    bmpPic1, bmpPic2,
bmpPicSmile, bmpPicX, bmpPicArrows;
  BITMAPS_END

CMDS_END

CMDPLACEMENT_SECTION
   // Command                             Group                            
   Priority
  guidRGSServicesPkg:RGSMarkerGroup, guidSHLMainMenu:IDM_VS_CTXT_CODEWIN,
0x0400;   
CMDPLACEMENT_END

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties and confers no rights.
Mendonca - 05 Nov 2004 06:44 GMT
Thanks for the reply,

>To only have them visible when the debugger is active, you
>could probably just add the commands or menu to the .CTC's
>VISIBILITY_SECTION so that it was only visible in the context of a debug
>session.
Pardon me, but i am not a C++ developer and CTCs are very new for me, how
can i accomplish the above. I am using a managed vsip package.

Thanks in advance.
Mendonca

>I created a custom marker service that added a popup menu just under the
> Copy/Edit/Paste portion of the code window's context menu, with the
[quoted text clipped - 75 lines]
>
> This post is 'AS IS' with no warranties and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.