VsTextViewClass::AddCommandFilter Method (IOleCommandTarget^, IOleCommandTarget^)
Visual Studio 2015
Adds a command filter to the existing chain of command filters.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
public: virtual int AddCommandFilter( IOleCommandTarget^ pNewCmdTarg, [OutAttribute] IOleCommandTarget^% ppNextCmdTarg )
Parameters
- pNewCmdTarg
-
Type:
Microsoft.VisualStudio.OLE.Interop::IOleCommandTarget^
[in] Pointer to the new command filter (IOleCommandTarget) to add to the command filter chain.
- ppNextCmdTarg
-
Type:
Microsoft.VisualStudio.OLE.Interop::IOleCommandTarget^
[out] Pointer to a command filter used to handle commands not dealt with by the pNewCmdTarg command filter.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Show: