IVsWindowSearchCustomFilter.ApplyFilter(String, Int32, Int32) 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.
Filters the current search string.
public:
void ApplyFilter([Runtime::InteropServices::Out] System::String ^ % pbstrSearchString, [Runtime::InteropServices::Out] int % piSelectionStart, [Runtime::InteropServices::Out] int % piSelectionEnd);
void ApplyFilter([Runtime::InteropServices::Out] std::wstring const & & pbstrSearchString, [Runtime::InteropServices::Out] int & piSelectionStart, [Runtime::InteropServices::Out] int & piSelectionEnd);
public void ApplyFilter (out string pbstrSearchString, out int piSelectionStart, out int piSelectionEnd);
abstract member ApplyFilter : string * int * int -> unit
Public Sub ApplyFilter (ByRef pbstrSearchString As String, ByRef piSelectionStart As Integer, ByRef piSelectionEnd As Integer)
Parameters
- pbstrSearchString
- String
[in, out] The current search string to be filtered. Returns a string modified by the filtering action.
- piSelectionStart
- Int32
[in, out] The position in the string to start filtering (0 indicates the first character in the string). Returns the starting position of the filtered string.
- piSelectionEnd
- Int32
[in, out] The position in the string to stop filtering (-1 indicates the last character in the string). Returns the stopping position of the filtered string.
Remarks
This method applies the filter to the current search string, returning the result and a selection interval delimiting the string that should be displayed. Use -1 to indicate string end, [0,-1] to select the whole string, and so on.
For example, you could append text like “Filter:(<parameter>)” if no text is selected and return a selection for the “<parameter>” string for easy replacement. You could also insert text around the selected text like “Filter:(<existing_selection>)”.