VsTextViewClass.AddCommandFilter(IOleCommandTarget, IOleCommandTarget) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a command filter to the existing chain of command filters.
public:
virtual int AddCommandFilter(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pNewCmdTarg, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ % ppNextCmdTarg) = Microsoft::VisualStudio::TextManager::Interop::IVsTextView::AddCommandFilter;
public:
virtual int AddCommandFilter(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pNewCmdTarg, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ % ppNextCmdTarg);
public:
virtual int AddCommandFilter(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pNewCmdTarg, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ & ppNextCmdTarg) = Microsoft::VisualStudio::TextManager::Interop::IVsTextView::AddCommandFilter;
virtual int AddCommandFilter(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget const & pNewCmdTarg, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget const & & ppNextCmdTarg);
public virtual int AddCommandFilter (Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pNewCmdTarg, out Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget ppNextCmdTarg);
abstract member AddCommandFilter : Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget * IOleCommandTarget -> int
override this.AddCommandFilter : Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget * IOleCommandTarget -> int
Public Overridable Function AddCommandFilter (pNewCmdTarg As IOleCommandTarget, ByRef ppNextCmdTarg As IOleCommandTarget) As Integer
Parameters
- pNewCmdTarg
- IOleCommandTarget
[in] Pointer to the new command filter (IOleCommandTarget) to add to the command filter chain.
- ppNextCmdTarg
- IOleCommandTarget
[out] Pointer to a command filter used to handle commands not dealt with by the pNewCmdTarg
command filter.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.