Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio Automation and Extensibility Reference
IDTCommandTarget Interface

Allows you to create named commands. You must implement this interface to handle new named commands.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

Visual Basic (Declaration)
<GuidAttribute("7EF39A3E-590D-4879-88D4-C9BE5BCFD92E")> _
Public Interface IDTCommandTarget
Visual Basic (Usage)
Dim instance As IDTCommandTarget
C#
[GuidAttribute("7EF39A3E-590D-4879-88D4-C9BE5BCFD92E")] 
public interface IDTCommandTarget
C++
[GuidAttribute(L"7EF39A3E-590D-4879-88D4-C9BE5BCFD92E")] 
public interface class IDTCommandTarget
J#
/** @attribute GuidAttribute("7EF39A3E-590D-4879-88D4-C9BE5BCFD92E") */ 
public interface IDTCommandTarget
JScript
GuidAttribute("7EF39A3E-590D-4879-88D4-C9BE5BCFD92E") 
public interface IDTCommandTarget

The IDTCommandTarget interface allows you to implement named commands in the environment. It also allows you to define the status of a command or execute it.

If you enter a command that was added with the AddNamedCommand method to the Command window, the Command window first uses the IDTCommandTarget interface's QueryStatus method to determine if the command is enabled. The same also applies if you call the ExecuteCommand method.

If an Add-in implements this interface in addition to IDTExtensibility2, then command execution is routed directly to this interface for named commands created by the Add-in.

This interface is analogous to the IDTCommandTarget interface defined in the Win32 SDK, except that the parameters of the method are OLE Automation compliant.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker