Hi Thomas,
I am implementing interface IOleCommandTarget on MyProjectNode
(Project class name). The method QueryStatus is not doing anything. but
just returning VsConstants.S_OK.
Now in the vs.net 2005 exp hive i am unable to execute any of the menu
command if i ve set the focus on my custom code editor.
the menus appears and after click nothing happens. please help.
Thanks
Kajal Sinha
Ed Dore [MSFT] - 25 Nov 2005 23:18 GMT
Hi Kajal,
You need to set the cmdf member of the appropriate OLECMD elements passed
via the OLECMD[] argument. There are several C# sample packages (one of
which is the BasicEditor sample), that have IOleCommandTarget
implementations. You might want to review the QueryStatus implementations in
those samples to get an idea of how to go about propertly implementing your
QueryStatus. Ideally, you should not be returning S_OK from your QueryStatus
implementation unless the command(s) in question is one that you want to
support.
Sincerely,
Ed Dore [MSFT]
This post is 'AS IS' with no warranties and confers no rights.
jimmy - 08 Dec 2005 17:56 GMT
Thanks Ed. its working now.