[IsCaseSensitive]
| 1534 | |
| 1535 | //! [IsCaseSensitive] |
| 1536 | bool AppWindow::IsCaseSensitive() |
| 1537 | { |
| 1538 | auto webView2_28 = m_webView.try_query<ICoreWebView2_28>(); |
| 1539 | CHECK_FEATURE_RETURN(webView2_28); |
| 1540 | wil::com_ptr<ICoreWebView2Find> webView2find; |
| 1541 | CHECK_FAILURE(webView2_28->get_Find(&webView2find)); |
| 1542 | |
| 1543 | auto m_env15 = m_webViewEnvironment.try_query<ICoreWebView2Environment15>(); |
| 1544 | CHECK_FEATURE_RETURN(m_env15); |
| 1545 | CHECK_FAILURE(webView2find->Stop()); |
| 1546 | |
| 1547 | if (!findOptions) |
| 1548 | { |
| 1549 | findOptions = SetDefaultFindOptions(); |
| 1550 | } |
| 1551 | BOOL caseSensitive; |
| 1552 | findOptions->get_IsCaseSensitive(&caseSensitive); |
| 1553 | CHECK_FAILURE(findOptions->put_IsCaseSensitive(!caseSensitive)); |
| 1554 | |
| 1555 | CHECK_FAILURE(webView2find->Start( |
| 1556 | findOptions.get(), Callback<ICoreWebView2FindStartCompletedHandler>( |
| 1557 | [this](HRESULT result) -> HRESULT { return S_OK; }) |
| 1558 | .Get())); |
| 1559 | return true; |
| 1560 | } |
| 1561 | //! [IsCaseSensitive] |
| 1562 | |
| 1563 | //! [ShouldHighlightAllMatches] |