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.