es...@ra.rockwell.co
unread,Nov 7, 2012, 4:04:14 AM11/7/12You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I want to hide the menu "Debug->Option and Settings" in VS2010.
I write code below, but I only disable this menu and not hide it. How can I hide this menu?
public int QueryStatus(ref Guid guidGroup, uint nCmdId, OLECMD[] oleCmd, IntPtr oleText)
{
int hr = 0;
for (uint i = 0; (i < oleCmd.Length) && hr >= 0; i++)
{
hr = (int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED;
if (oleCmd[i].cmdID ==(uint) 371)// 'Debug->Option and Settings' menu command id
{
oleCmd[i].cmdf =(uint)Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_INVISIBLE;
oleCmd[i].cmdf |= (uint)Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_SUPPORTED;
return VSConstants.S_OK;
}
}
return hr;
}