IVsWindowSearchCustomFilter.ApplyFilter(String, Int32, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
筛选当前搜索字符串。
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 : * * -> unit
Public Sub ApplyFilter (ByRef pbstrSearchString As String, ByRef piSelectionStart As Integer, ByRef piSelectionEnd As Integer)
参数
- pbstrSearchString
- String
[in,out]要筛选的当前搜索字符串。 返回筛选操作修改的字符串。
- piSelectionStart
- Int32
[in,out]要开始筛选的字符串中的位置 (0 指示字符串) 中的第一个字符。 返回筛选的字符串的起始位置。
- piSelectionEnd
- Int32
[in,out]要停止筛选的字符串中的位置 (-1 指示字符串) 中的最后一个字符。 返回筛选的字符串的停止位置。
注解
此方法会将筛选器应用于当前的搜索字符串,并返回结果和分隔应显示的字符串的选择间隔。 使用-1 指示字符串结尾,[0,-1] 以选择整个字符串,等等。
例如,如果未选择任何文本,则可以追加类似于 "Filter: (<parameter>) " 的文本,并返回 "" 字符串的选择, <parameter> 以便于替换。 还可以在所选文本周围插入文本,如 "Filter: (<existing_selection>) "。