IVsWindowSearchCustomFilter::ApplyFilter Method (String^, Int32, Int32)
Filters the current search string.
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
void ApplyFilter( String^% pbstrSearchString, int% piSelectionStart, int% piSelectionEnd )
Parameters
- pbstrSearchString
-
Type:
System::String^
[in, out] The current search string to be filtered. Returns a string modified by the filtering action.
- piSelectionStart
-
Type:
System::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
-
Type:
System::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.
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>)”.